Java -Zeichenfolge nicht gleich
String name = "John";
// prints true to standard system output.
System.out.print(!name.equals("Alex"));
Helpless Hornet
String name = "John";
// prints true to standard system output.
System.out.print(!name.equals("Alex"));
String first = "Hello";
String second = "hELLo";
if(first.equal(second)) {
// Check if first string is equal to second string. lower/upper case matter.
}
if(first.equalsIgnoreCase(second)) {
// Check if first string is equal to second string. lower/upper does not matter.
}