How to know if a given string is substring from another string in Java

There is a contains() method! It was introduced in Java 1.5. If you are using an earlier version, then it’s easy to replace it with this:

str.indexOf(substr) != -1

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)