java tutorial - Java string contains - java programming - learn java - java basics - java for beginners
Learn java - java tutorial - Java String Contains - java examples - java programs
Java String contains :
- This method searches the sequence of characters in this string. If the sequence of char values is found in this string, then it returns true or else it returns false.
Parameter :
- sequence : it specifies the sequence of characters to be searched.
Returns :
- True if the sequence of char value exists, or else false.
Throws :
- NullPointerException : if the sequence is null.
Syntax :
- The Java String class has the method contains() to check if a String contains a specified character sequence. The syntax is shown below: