In java, How to print reversely in a given String?
class ReveseString{
public static void main(String args[]){
String s="String is immutable";
for(int i=s.length()-1; i>=0; i--){
System.out.print(s.charAt(i));
}
}
}
class ReveseString{
public static void main(String args[]){
String s="String is immutable";
for(int i=s.length()-1; i>=0; i--){
System.out.print(s.charAt(i));
}
}
}