lastIndexOf java

lastIndexOf() StringBuffer Example

java.lang.StringBuffer class comes with many helper methods to manipulate string. One of the methods is overloaded lastsIndexOf() method used to search for the last occurrence of a stirng in the buffer. What Java API says abou lastIndexOf() StringBuffer: public int lastsIndexOf(String searchString): Returns an int value of the last occurrence…