how to say if string does not equal in java code example
Example 1: java not equal to
if(5 != 4) // != means "not equal to"
return true;
Example 2: java string not equal
String name = "John";
// prints true to standard system output.
System.out.print(!name.equals("Alex"));