StringBuffer
-
Create a
StringBuffer
StringBuffer s = new StringBuffer("this is a string"); String s1 = "Hello World"; StringBuffer s2 = new StringBuffer(s2);
-
API
-
reverse a string
StringBuffer s = new StringBuffer("this is a string"); s.reverse(); String ans = s.toString();
-