Say my string is as follows
String str = "What is up tod?";
I want to use an accessor method to print out the position of the first occurrence of the letter "t". What is an efficient use of code to use? I also want to ensure that it doesn't try to tell me the occurrence of the second "t". Please keep in mind I am searching for how to do this in Java.
Any help or link to similar question is greatly appreciated.