1 package test.polymorphic; 2 3 public class SuperClass { 4 5 public SuperClass() { 6 7 } 8 9 public SuperClass(int i) { 10 PolymorphicTest.LOG.append("parent " + i).append(" "); 11 } 12 13 public SuperClass(String s) { 14 PolymorphicTest.LOG.append("parent " + s).append(" "); 15 } 16 17 public synchronized void methodTest() { 18 PolymorphicTest.LOG.append("parent "); 19 } 20 21 public synchronized void methodTest(int i) { 22 PolymorphicTest.LOG.append("parent " + i + " "); 23 } 24 } | Popular Tags |