Hi nachiket,
Your code sample:
causes the following compile-errors:
When executed using JDK 1.3. Are you using an
IDE to compile? Assuming you are, and the IDE is producing a clean compile, the reason you are not seeing any output is because you are not instantiating an instance of the class.
Comment out <code>new test1()</code> in your constructor (you'll get a bunch of runtime errors if you leave it in) and add <code>new test1()</code> in <code>main()</code>
Hope that helps.
PS If you are studying for the SCJP2 it's really much more useful to compile examples from the command-line using the JDK vs using an IDE. Most IDE's do optimizations and various other things to your code. The exam questions are based on you knowing what will happen using the JDK.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform