Answers for "how to check a character in a string java"

1

java Finding a Character in a String

String txt = "Please locate where 'locate' occurs!";
System.out.println(txt.indexOf("locate")); // Outputs 7
Posted by: Guest on October-15-2021

Code answers related to "how to check a character in a string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language