Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Define an interface in your own words.
Think about what is required to fulfill a contract.
Mention one advantage of using interfaces.
Consider how classes can share behaviors.
What is an interface in Java?
Remember, interfaces are like contracts.
True or False: An interface can have method bodies.
Think about the nature of abstract methods.
Create an interface named 'Vehicle' that has an abstract method 'move()'. Then, create two classes 'Car' and 'Bike' that implement 'Vehicle'.
Focus on defining both the interface and the implementing classes properly.
Explain how interfaces promote software design principles such as abstraction and polymorphism.
Consider how this separation of concern affects class design.
6 more questions in this section. Enroll free to practise them all.
Enroll free