Created
November 23, 2017 08:08
-
-
Save hadifar/535593dbbd45fbed830ba975de7f0792 to your computer and use it in GitHub Desktop.
interface vs abstract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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