Learn Java Programming - String Class Tutorials contains(...)
The contains() method is very useful for searching strings to see if they contain a specific value. The method will return true if the parameter string is found inside of the current string instance, if not, it will return false. For example, String a = "hen fox house"; if ( a.contains("fox") ) { System.out.println("Found a fox in the hen house."); }














