InterviewSolution
Saved Bookmarks
| 1. |
What is the use of default method in interface? |
|
Answer» The DEFAULT method implementation was introduced by Java 8 so that the OLD interfaces can use the lambda expression without implementing the methods in the implementation class. ExampleSYNTAX:- public INTERFACE interview { default void print() { System.out.println("Welcome Bestinterviewquestion.com"); } } |
|