| Author |
compile time error
|
A Kumar
Ranch Hand
Joined: Jul 04, 2004
Posts: 973
|
|
I am getting some compile time errors .I am using 1.4 can any one help me Thanks in advance
|
 |
A Kumar
Ranch Hand
Joined: Jul 04, 2004
Posts: 973
|
|
The first for loop is an empty one for(;
|
 |
Krishna Latha Grandhi
Ranch Hand
Joined: Nov 08, 2005
Posts: 110
|
|
Hi kumar, As per my knowledge we can only place the labels just before loops.
|
 |
A Kumar
Ranch Hand
Joined: Jul 04, 2004
Posts: 973
|
|
we can only place the labels just before loop
Just Comment out the inside of switch loop and try...it doesnt give any compile time error Regards
|
 |
Krishna Latha Grandhi
Ranch Hand
Joined: Nov 08, 2005
Posts: 110
|
|
Hi kumar, We can place labels before any statment. But we can able to jump to outside of the loop by identifying the loop with label. goto like jumps is not possible in java.
The outer label should appear just before the loop begins. It does not matter if it is on the same line or not. From K&B book
Hope u understood Regards krishna
|
 |
A Kumar
Ranch Hand
Joined: Jul 04, 2004
Posts: 973
|
|
Thanks Krishna ..Got it..
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
Is this something specifically do do with SCJP? If not, please consider posting such topics in our Java In General forums. Just because you are studying for SCJP it does not mean you should post every Java issue you have in this forum. Thanks -Barry
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
 |
|
|
subject: compile time error
|
|
|