Java Java Data Structures Organizing Data Interfaces

Hudson Kim
Hudson Kim
2,965 Points

What Does He Mean?

What does this mean:

Treet other = (Treet) obj;
    if (equals(other)) {
      return 0;
Jake Goodman
Jake Goodman
3,381 Points

The equals method will be called on the instance of Treet that calls the method. For example, if you have a Treet object and you call this block of code on it, "equals(other)" will be called on that particular instance of the Treet.