Java Interface: Multiple Inheritance and Abstraction MCQ Quiz
[Image showing Java Interface vs Class relationship diagram]Interfaces & Multiple Inheritance Quiz
1. Which keyword is used to declare an interface?
2. Which keyword is used to implement an interface?
3. Can we create an object of an interface?
4. All variables in an interface are by default?
5. All methods in an interface (before Java 8) are by default?
6. Which is TRUE about interface methods in Java 8+?
7. Interface supports which inheritance?
8. Which keyword is used when an interface inherits another interface?
9. Can an interface extend another interface?
10. Can a class extend multiple classes in Java?
11. Can a class implement multiple interfaces?
12. Can interface have constructors?
13. Which is NOT allowed in interface?
14. What happens if a class does not implement all interface methods?
15. Can interface variables be modified?
16. Which is TRUE?
17. Which is correct about interface?
18. Why Java introduced default methods in interfaces (Java 8)?