package simplejava; public class TestConstructor { int p ; public void TestConstructor(int p) { this.p=p; } public static void main(String[] args) { TestConstructor tp = new TestConstructor(10); TestConstructor tp = new TestConstructor(); System.out.println("p = "+tp.p); } }