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.

Example

                                        

Syntax:-

public interface interview {

        default void print() {

System.out.println("Welcome Bestinterviewquestion.com");

             }

    }

Suggest An Answer

No suggestions avaliable!