• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java comments do not work!!!!!

 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class ADirtyOne
{
// char a = '\uA'
}
Why does this code does not compile when I give the comment in front of the line.
 
Phil Chuang
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic