Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java Finding a Character in a String

String txt = "Please locate where 'locate' occurs!";
System.out.println(txt.indexOf("locate")); // Outputs 7
 
PREVIOUS NEXT
Tagged: #java #Finding #Character #String
ADD COMMENT
Topic
Name
6+8 =