indexOf() ,length() and trim()
- 26th Dec 2017
- 0
- 14343
- different method in indexof() how to find index of a specific character in string in java how to find length of string in java How to remove trailing spaces of string in java indexof() method in java length() method in java trim() method in java
Let us understand IndexOf(), length() and trim() indexOf() method This method returns the index of first occurrence of a substring or a character or -1 if the character does not occur. indexOf() method has 4 different overloaded forms int indexOf(int ch) It returns the index of the first occurrence of the specified character within this […]