Free Object-oriented basics lessonsObject-oriented basics · Stage 3 · Abstraction and design choices · Step 1
Abstract classes and interfaces
Two ways to define a contract without an implementation, what each can hold, and how to choose between them. About 13 minutes.
Which of these can an interface (not counting default or static methods) NOT have?
- AInstance fields that each implementer gets its own copy of
- BConstants
- CAbstract method signatures
Show the answer
Instance fields that each implementer gets its own copy of. Interfaces hold no instance state.
4 questions on this idea
Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.
Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve