Created
October 2, 2019 15:29
-
-
Save devindianushika/bb2db7c8ad29d56efea7ae5eb2699395 to your computer and use it in GitHub Desktop.
This file contains 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
class Parent{ | |
public void m1() { | |
System.out.println("parent"); | |
} | |
} | |
class Child extends Parent{ | |
public void m2(){ | |
System.out.println("child"); | |
} | |
} | |
class Test{ | |
public static void main(String[] args) { | |
Child c = new Child(); | |
c.m1(); | |
c.m2(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment