← All topics
Quiz: Abstract Classes and Interfaces: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Can you create an object of an abstract class with new?
- Q2. How many interfaces can a class implement?
- Q3. Fields declared in an interface are automatically:
- Q4. What does this print? (code)
- Q5. Which is a functional interface?
- Q6. What does this print? (code)
- Q7. A class implements an interface but does not implement one of its abstract methods. What happens?
- Q8. What does this print? (code)
- Q9. Which can an abstract class have that an interface cannot?
- Q10. What does this print? (code)