I am surprised how a topic which is not used at all in the Java world could ignite such a discussion. In OCPJP, labels are there only for the questions with labelled break. Application wise, labels are never used at all. This is a migration from C's jump statements.
Also Shalini, Gaurang's code is correct
This code runs and outputs the String inside the println.
The error is due to improper ending(without the semicolon) which actually makes the the closing bracket as a statement which is clearly an error and this is stated very specifically when you do a javac on the class file.
[ SCJP 6.0 - 90% ] , JSP, Servlets and Learning EJB.
Try out the programs using a TextEditor. Textpad - Java 6 api
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com