string includes java code example
Example 1: .includes( string
var str = "Hello world, welcome to the universe.";
var n = str.includes("world");
Example 2: contains example in java
String s1 = "My name is GFG";
// prints true
System.out.println(s1.contains("GFG"));
// prints false
System.out.println(s1.contains("geeks"));