Answered step by step
Verified Expert Solution
Link Copied!
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... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students explore these related Programming questions