Ad
  • Custom User Avatar

    "==" is valid if you're comparing two primitive types of data, like Integers, booleans and so. Otherwise, you use .equals(), that is a default method from every object to compare objects (In this case, any instance of 'String' is an object so you must use .equals() to compare two Strings).