Reverse string using StringBuffer class
StringBuffer class contains a method reverse which can be used to reverse or invert an object of this class.
All Computer Programming languages and its basics (C,C++,JAVA,PHP,SAP(ALL MODULES)
class InvertString { public static void main(String args[]) { StringBuffer a = new StringBuffer("Java programming is fun"); System.out.println(a.reverse()); } }