aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes why this gives me compiler error?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "why this gives me compiler error??" Watch "why this gives me compiler error??" New topic
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

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: why this gives me compiler error??
 
Similar Threads
Doubt in Exceptions.
String concentation
Using Replace in JSTL
One more on wrapper classes from Dan's mock exam..
please help --applet not initialsed error