Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question: What is the role of the default keyword in Java interfaces? A) It allows interface methods to have a body with a default implementation.
Question: What is the role of the default keyword in Java interfaces?
A) It allows interface methods to have a body with a default implementation.
B) It makes the interface methods static and callable without creating an instance.
C) It ensures that all implementing classes must override the method.
D) It restricts the interface to only be used within the package where it is defined.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The detailed answer for the above question is provided below The correct option isA It allows interface methods to have a body with a default implemen...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started