Question: Question: What does the default keyword signify in an interface method in Java? A) It allows the method to be overridden by implementing classes. B)

Question: What does the default keyword signify in an interface method in Java?

A) It allows the method to be overridden by implementing classes.
B) It provides a default implementation for a method in an interface, allowing it to be used directly by classes that implement the interface.
C) It prevents the method from being implemented in any class that uses the interface.
D) It makes the method static, so it belongs to the interface itself rather than instances of the implementing classes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below The correct option is B It provides a default implementation for a method in an interface ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!