Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot find symbol might mean refuse to notice symbol

 
Charles Bradley
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was composing a request for help when I discovered the source of my problem. I was getting an error message "cannot find symbol" referring to a symbol in another class in the same directory. If you are referring to a method, but forget the parentheses, javac only checks the instance variables. I hope no one else makes this silly mistake, but if you do, remember that cannot find symbol might mean refuse to notice symbol. Thanks for a useful site. I expect to visit it frequently.
 
Fred Hamilton
Ranch Hand
Posts: 684
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
been there. Would you prefer "Could not find the symbol among those types of symbols you told me to look under". ?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49382
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch
 
Charles Bradley
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hesitate to suggest a changed message. My limited experience with compiler error messages and recovery procedures tells me it is hard to find the ideal message to cover every situation. My comment was not a complaint about the compiler. It was just an observation that might help another user.
 
Fred Hamilton
Ranch Hand
Posts: 684
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was joking. It's cool that you offer observations when no-one has asked, but this being a help forum it is likely that if you continue to do so, then people will continue to assume that you are asking for help or an explanation. No big deal though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic