Friday, 3 June 2022

Default method in interface | Java 8

 

We can define default method  in Interface. it will not force implementation class in override it.


interface examle{

 default void show(){

System.out.println("Default method called.");

}


}


No comments:

Post a Comment