reverse java

reverse() StringBuffer Example

java.lang.StringBuffer class comes with many utility methods to manipulate string. One of the method is reverse() used to reverse the contents of the buffer. After this method call, original buffer itself gets effected. Note: reverse() is not a method of String; applying on string raises compilation error. What Java API…

reverse() StringBuffer Example

StringBuffer comes with many utility methods to do operations on strings apart String class own methods. One such method is reverse() method. StringBuffer, with its nature of mutability, comes with many methods that do not exist in String. One useful method is reverse() method which reverses the existing contents in…