Created
September 30, 2014 23:09
-
-
Save JacobLeach/679e3ac2513597afb221 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
public class Test | |
{ | |
public static void main(String[] args) | |
{ | |
Parent a = new Parent(); | |
Child b = new Child(); | |
a.hello(); | |
b.hello(); | |
a.hello2(); | |
b.hello2(); | |
a.hello3(); | |
b.hello3(); | |
} | |
static class Parent | |
{ | |
public static void hello() | |
{ | |
System.out.println("Parent"); | |
} | |
public static void hello2() | |
{ | |
hello(); | |
} | |
public static void hello3() | |
{ | |
hello(); | |
} | |
} | |
static class Child extends Parent | |
{ | |
public static void hello() | |
{ | |
System.out.println("Child"); | |
} | |
public static void hello2() | |
{ | |
hello(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment