This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 8903

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: //comments
 
Similar Threads
why sometime we need to initialize integer variable ?
The method showMessageDialog(Component, Object) in the type JOptionPane is not applic
final variable initialization
Large Numbers
Switch Case Problem