Tag: java to find char in string

Java String Find matching characters indexOf(), lastIndexOf()

February 21, 2011 · 4 min read
###### To Java String find matching, we use three methods - overloaded **indexOf()** and **lastIndexOf()** and **charAt()**. Index numbers are given by the JVM implicitly to the characters in the string; the first character is given 0, the second one as 1 and so on. These index numbers are helpful in programming in searching operations.