Strings in java theory code example
Example 1: string in java
In java, string is an object. It is sequence of character values enclosed by
double quotes.
Example 2: string method example in java
public boolean contains(“searchString”)
String x = “Java is programming language”;
System.out.println(x.contains(“Amit”)); // This will print false
System.out.println(x.contains(“Java”)); // This will print true