public class ReverseString { public static void main(String[] args) { String a = "Test"; String aReversed = new StringBuilder(a).reverse().toString(); System.out.println(aReversed); // returns tseT } }
public class ReverseString { public static void main(String[] args) { String a = "Test"; String aReversed = new StringBuilder(a).reverse().toString(); System.out.println(aReversed); // returns tseT } }