same string not equal java code example
Example 1: java string not equal
String name = "John";
// prints true to standard system output.
System.out.print(!name.equals("Alex"));
Example 2: how to know if String is the same java
String1.equals(String2)