Jump to content

NitroUK

Member
  • Posts

    11
  • Joined

  • Last visited

Reputation Activity

  1. Like
    NitroUK reacted to Mira Yurizaki in A noobs question java   
    In Java, assuming the class didn't override it, the == operator on two variables objects checks if their references are the same. That is, if they're pointing to the same object.
     
    So no, that won't work. Use the String.equals() method to check if the contents are the same. See https://www.geeksforgeeks.org/difference-equals-method-java/
×