} } Could anyone explain to me the context in which it is invalid. Any explanation is truly appreciated. Thank you.
Joined: Jun 30, 2000
I believe you can label anything in your program, but you can't use a break or continue with a label unless what immediatly follows the label is a loop for continue and break or a switch statement for break only (not continue). Bill
Joined: Mar 17, 2000
Sridevi, which compiler are you using? I cannot compile your program ( Suns' javac ( JDK1.3 ) compiler ). I get an error, as expected, that says " A declaration cannot be labeled" indicating the label1: float f = 1.3f ; statement.