if (str1.toLowerCase().contains(str2.toLowerCase())
System.out.println("yes string 2 is found in string 1");
if (str1.toLowerCase().contains(str2.toLowerCase())
System.out.println("yes string 2 is found in string 1");
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.