Write a Program to string the string builder

 Write a Program to string the string builder


public class ReverseBuild {
    
    public static void main(String[] args) {
        String str = "TATA";
        StringBuilder buff = new StringBuilder(str);
        StringBuilder rev = buff.reverse();

        System.out.println(rev);
    }   
    
}

Output of program :


 

Comments