• Post Reply Bookmark Topic Watch Topic
  • New Topic

Missing Symbol Errors  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting some errors that have me stuck on my code. I'm trying to call a method in my GUI from my driver but I'm getting missing symbol errors.. Here are the errors:


Here's the GUI and the Driver:




 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

"Cannot find symbol" means that you've used a name in your program (for example, a variable name, method name or class name) that is unknown to the compiler.

In your case, the compiler tells you that class PetAdoptionGUI does not have a method getMenu() that takes no arguments, and that it doesn't know a class named SelectionListener.

Looking at your code, those two items are indeed missing.
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no getMenu() method in the PetAdoptionGUI class. Check very closely how many { and } you have got; I suspect you have inadvertently put it into the wrong class. A consistent indentation convention would have made that more obvious: also // end comments after every } to show what you are closing.
If SelectionListener is a private inner class, then it is not accessible outside its class file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!