Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What does == compare in Java?
Think about what `==` really checks between two variables.
What is the default behavior of .equals()?
Recall how objects are treated in memory.
What does the == operator check when applied to objects?
Think about what it means to point to the same object.
Is s1.equals(s2) true if s1 and s2 are two different objects with identical attributes?
Consider how equality is defined without overriding.
Create a Book class and implement equals() so that two books are considered equal if they have the same title and author.
What attributes must you compare to ensure equality?
Imagine a software application that tracks student records. How would you ensure that two student objects denote the same student when compared?
What unique attributes can reliably signify the same person?
5 more questions in this section. Enroll free to practise them all.
Enroll free