The ________ keyword is used to provide the default implementation of a method declared in an interface.

  • default
  • define
  • extend
  • implement
In Java, the default keyword is used to provide a default implementation of a method declared in an interface. This allows the interface to evolve over time without breaking the existing implementing classes. The default keyword signifies that the method has a default implementation in the interface. The other options are not used for this purpose.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *