How to print the reverse of the String java is object orientated language without using any predefined function like reverse()?
java is object orientated language
reverse()
public class StringReverse { public static void main(String[] args) { String s= (args[0]); for (int i =s.length()-1; i >= 0; i--) { System.out.print(s.charAt(i)); } } }
Prints the reversed string of the input.