• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with this

 
khella smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i was playing around with code and i did this:
public class Tries{
//char a ='\u000A';}
how come i have an error even after ignoring that line that has char in it? isnt it supposed to ignore that line?
pls help
 
Marcel de Jong
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
for a solution and explanation check out this link.
http://www.smotricz.com/kabutz/Issue050.html
[ June 17, 2002: Message edited by: Marcel de Jong ]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see this explaination.
Remember that the linefeed is going to happen BEFORE any compiling starts. So the compiler will see this as:
//char a ='
';} // this is on a separate line now
Only the first line is commented out. The second line is not valid syntax.
 
khella smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks alot cindy and marcel
those 2 explanations really helped
[ June 17, 2002: Message edited by: khella smith ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic