my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Cannot find symbol error in switch-case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Cannot find symbol error in switch-case" Watch "Cannot find symbol error in switch-case" New topic
Author

Cannot find symbol error in switch-case

Josh Bilger
Greenhorn

Joined: May 08, 2011
Posts: 1
I'm getting the cannot find symbol error. I've got 3 classes, I don't know if I need to link them or what, but I've tried googling and anything else I can think of. Its probably something so simple i'm just overlooking it but if someone could help it'd be greatly appreciated!!

first class is flashcard.java



The error is in the FlashCard.java saying cannot find symbol in regards to all of the case statements.

Thanks again!>
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38902
    
  23
Welcome to the Ranch
I have split your post from its previous location because it is a new question. Please supply more details, eg line number, which "symbol" it can't find.
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4392
    
    8

It looks like your switch statement is in the FlashCard class, but all the methods you're calling in it are in the CardCollection class.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38902
    
  23
I thought there was something wrong with all those static methods. You ought to be creating objects of your classes, then you won't need to mark those methods static.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cannot find symbol error in switch-case