Hi Guys!
It never came to my mind that the response could be virtual machine implemenation dependent. Thanks for the inputs.
I ran the code from command prompt using jdk1.4_1, the answer i get is 2. If I run the code in VisualAge For
Java, which has jdk1.2 on an IBM virtual machine, the answer is 1.
Maybe the Java Pundits at the ranch might like to comment on the issue.
Regards,
Anupreet