indexOf() StringBuffer Example

java.lang.StringBuffer class comes with many helper methods to manipulate string. One of the methods is overloaded indexOf() method used to search for the first occurrence of a string in the buffer. Let us see what Java API says about indexOf() StringBuffer: public int indexOf(String searchString): Returns an int value of the index number of first …

indexOf() StringBuffer Example Read More »