how to check if a string is a part of another string in java code example
Example: string check if substring exists java
String str1 = "Java";
String str2 = "va";
if(str1.contains(str2)){
// str1.contains(str2) will be true here.
System.out.println("I am true");
}