Created
August 16, 2014 19:35
-
-
Save shixiaoyu/302fc698da52f880490f to your computer and use it in GitHub Desktop.
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
public class TestClass { | |
public TestClass() { | |
print(); | |
public void print() { | |
System.out.println(this.getClass() + ": a:" + this.a + ", b:" + this.b); | |
public static void main(String[] args) { | |
TestClass test1 = new TestClass(); | |
TestClass test2 = new TestClass2(); | |
TestClass test3 = new TestClass3(); | |
class TestClass2 extends TestClass { | |
public TestClass2() { | |
super(); | |
print(); | |
class TestClass3 extends TestClass2 { | |
public TestClass3() { | |
print(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment