[java] How to search a string in another string?

Possible Duplicate:
How to see if a substring exists inside another string in Java 1.4

How would I search for a string in another string?

This is an example of what I'm talking about:

String word = "cat";
String text = "The cat is on the table";
Boolean found;

found = findInString(word, text); //this method is what I want to know

If the string "word" is in the string "text", the method "findInString(String, String)" returns true else it returns false.

This question is related to java string

The answer is