String contains() Java

String contains() Java

Existence of a substring in the main string can be checked with String contains() method.


String contains()
Output screen on String contains() Java

Existence of a small string (substring) can be checked with indexOf() method also.

For other String and StringBuffer API methods check String and StringBuffer.

Leave a Reply

Your email address will not be published. Required fields are marked *