Q1: What is the difference between == and .equals() in Java? Answer: == checks if two references point to the same object in memory. .equals() checks if two objects have the same content or value.
Most new Java developers quickly learn that they should generally compare Java Strings using String.equals(Object) rather than using ==. This is emphasized and reinforced to new developers repeatedly ...