Reverse a string in java
// reverse a string using character array
class ReverseUsingCharacterArray
{
public static void main(String[] args)
{
String str = "HelloWorldJava";
char[] ch = str.toCharArray();
for(int a = ch.length - 1; a >= 0; a--)
System.out.print(ch[a]);
}
}