Skip to content

Instantly share code, notes, and snippets.

@hadifar
Created November 23, 2017 08:08
Show Gist options
  • Select an option

  • Save hadifar/535593dbbd45fbed830ba975de7f0792 to your computer and use it in GitHub Desktop.

Select an option

Save hadifar/535593dbbd45fbed830ba975de7f0792 to your computer and use it in GitHub Desktop.
interface vs abstract
interface Example1{
public void display1();
}
interface Example2 extends Example1{
}
class Example3 implements Example2{
public void display1(){
System.out.println("display1 method");
}
}
class Demo{
public static void main(String args[]){
Example3 obj=new Example3();
obj.display1();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment