Programming Languages Java Mcq
Sep 24, 2025

Which of the following is true about Java 8 default methods?

Choose the correct answer:
A) They can be overridden in implementing classes
B) They cannot access instance variables
C) They solve the diamond problem completely
D) All of the above
Detailed Explanation
Default methods can be overridden in implementing classes. They cannot access instance variables (only static variables), and diamond problem still exists when multiple interfaces have same default method.
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback