The first and foremost way to check for the presence of a substring is the .contains() method. It's provided by the String class itself and is very efficient. The method accepts a CharSequence and returns true if the sequence is present in the String we call the method on.
String string = "Java";
String substring = "va";