Test your knowledge
A default method allows us to declare:
A default constructor for an interface that Java will use when the class that implements the interface doesn't declare a constructor.
A method that will be called before any method is executed for the instance of a class that implements the interface.
A default implementation for a method in an interface that Java will use when a class that implements the interface doesn't provide its own implementation of this method.
Consider that we have an existing interface that many classes implement and all the classes compile without errors. If we add a default method to this interface:
The classes that implement the interface won't compile until they provide an implementation for the new method requirement.
The classes that implement the interface won't compile until they provide an implementation for the new constructor requirement.
The classes that implement the interface will compile.
Which of the following keywords allow us to determine whether...