Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the Object class in Java?
Think about where all classes start from.
What does method overriding allow in Java?
Consider how subclasses can change behaviors.
What method is used to compare two objects for equality in Java?
Think of how you'd compare two items.
True or False: Every class in Java inherits from the Object class.
Consider the root of the class hierarchy.
Create a Java class hierarchy with a superclass Vehicle and subclasses Car and Truck. Override a method in both subclasses and demonstrate polymorphism.
Think of how methods might behave differently in subclasses.
Why is method overriding also beneficial for code testing?
Consider how testing frameworks often need different behaviors from the same method.
4 more questions in this section. Enroll free to practise them all.
Enroll free