The contains() method in Java's String class offers a convenient solution for efficiently checking the existence of a substring within a given string. Learn the correct spelling and usage of the verb "contains" with examples and tips. Avoid the common mistake of writing "containes" and confuse your reader or listener. Syntax of contains () The syntax of the String contains() method is: string.contains(CharSequence ch) Here, string is an object of the String class. Learn how to use the contains() method to check if a string contains a sequence of characters. See syntax, parameter, return value, and examples of the method.