It will return -1 if the character is not in the String. If you need information like this, the answers are readily available in the free
Java API docs available from Sun. You cannot become a good Java programmer without learning how to read and research the APIs.
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)