wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Java comments do not work!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java comments do not work!!!!!" Watch "Java comments do not work!!!!!" New topic
Author

Java comments do not work!!!!!

Chandra Bairi
Ranch Hand

Joined: Sep 12, 2003
Posts: 152
public class ADirtyOne
{
// char a = '\uA'
}
Why does this code does not compile when I give the comment in front of the line.


Thanks,
Shekar
Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
never mind, I read the post from the summary box and it made it seem everything was on one line. hehe that'll teach me to re-read sections of code first before replying
[ October 20, 2003: Message edited by: Phil Chuang ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Translation of Unicode escapes is done first, before any parsing is done, so that a bad Unicode escape sequence is an error even in a comment. See sections 3.1 - 3.3 of the Java Language Specification.


[Jess in Action][AskingGoodQuestions]
 
Consider Paul's rocket mass heater.
 
subject: Java comments do not work!!!!!
 
Similar Threads
Barn Burning Patterns
WA #2 ..... word association
Need help understanding generics.
How low level do YOU code ?
Jboss in Action question: migration from other Application Servers