aspose file tools*
The moose likes Beginning Java and the fly likes //comments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "//comments" Watch "//comments" New topic
Author

//comments

Fitz Herbert
Greenhorn

Joined: Mar 22, 2003
Posts: 21
I placed a single line comment into a program and encountered a syntax error
I then removed the comment from inside the {} of the condition expression
and encounted no error.
I thought comments could be placed any where
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Are you sure that difference = num1-num2; is in a line below the comment and not in the same line as the comment?


Groovy
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
It's *very* unlikely that your comment is causing a syntax error.
Weird comments can cause compilation errors, but this isn't your problem.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
What exactly was the syntax error?


Dave
 
Consider Paul's rocket mass heater.
 
subject: //comments