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()
this is the best solution for this
public class String_rev { public static void main(String[] args) { String str="Karan Rajput"; int ln=str.length(); for (int i = ln; i > 0; i--) { System.out.print(str.charAt(i-1)); } }
}