| Author |
why this gives me compiler error??
|
srikanth reddy
Ranch Hand
Joined: Jul 28, 2005
Posts: 252
|
|
here i have commented the line then how come it give me an error ??
|
Thanks & Regards<br /> <br />-Srikanth
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4350
|
|
|
this is the symbol for the linefeed
|
SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
A frequently asked question: please search this forum or your Java book.
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
A Kumar
Ranch Hand
Joined: Jul 04, 2004
Posts: 973
|
|
Hi, This compiles fine..also the below one.. The compiler is indeed parsing through the single line comment...
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
"/* ... */" can be used for multiline comments so it does not matter if a linefeed is present between them. "// ... " is for a single line comment so the linefeed has an impact on what the compiler sees on the next line.
|
 |
A Kumar
Ranch Hand
Joined: Jul 04, 2004
Posts: 973
|
|
Thanks barry
|
 |
 |
|
|
subject: why this gives me compiler error??
|
|
|