Answer:
the indexOf() method
Step-by-step explanation:
The indexOf() method in java returns the first occurrence of the of the string or a character specified in it.It can be used to search both a character or a string.
for example:-
import java.util.*;
import java.lang.*;
import java.io.*;
class indexOf
{
 public static void main (String[] args)
 {
 String s="IamNumber4";
 int l=s.indexOf("Num");//using indexOf() method on string object..
 System.out.println(l);
 }
}
Output:-
3