algorithm in java to reverse string code example
Example: reverse string java
String string="whatever";
String reverse = new StringBuffer(string).reverse().toString();
System.out.println(reverse);
String string="whatever";
String reverse = new StringBuffer(string).reverse().toString();
System.out.println(reverse);