| Author |
Head First Java - QuizCardBuilder won't compile
|
Brian Altman
Greenhorn
Joined: Nov 16, 2012
Posts: 5
|
|
Hi,
I can't get this to compile. Where are my errors?
Here are the errors I'm receiving:
QuizCardBuilder.java:11: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder
private ArrayList<QuizCard> cardList;
^
QuizCardBuilder.java:45: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder
cardList = new ArrayList<QuizCard>();
^
QuizCardBuilder.java:75: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder.NextCardListener
QuizCard card = new QuizCard(question.getText(), answer.getText());
^
QuizCardBuilder.java:75: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder.NextCardListener
QuizCard card = new QuizCard(question.getText(), answer.getText());
^
QuizCardBuilder.java:84: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder.SaveMenuListener
QuizCard card = new QuizCard(question.getText(), answer.getText());
^
QuizCardBuilder.java:84: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder.SaveMenuListener
QuizCard card = new QuizCard(question.getText(), answer.getText());
^
QuizCardBuilder.java:110: cannot find symbol
symbol : class QuizCard
location: class QuizCardBuilder
for(QuizCard card:cardList) {
^
7 errors
Thanks in advance for any help!
|
 |
Kemal Sokolovic
Bartender
Joined: Jun 19, 2010
Posts: 792
|
|
Based on the messages you get, you're missing classes (QuizCard and QuizCardBuilder for start).
If you have the source code of these classes, then you need to make your class available to see it (either put all of them in the same package or add import statement in your existing class).
|
The quieter you are, the more you are able to hear.
|
 |
Brian Altman
Greenhorn
Joined: Nov 16, 2012
Posts: 5
|
|
|
Class QuizCardBuilder is in my code above. I don't see a QuizCard class anywhere in the book.
|
 |
Brian Altman
Greenhorn
Joined: Nov 16, 2012
Posts: 5
|
|
Nevermind, I just read in the book that I'm supposed to make the QuizCard class myself.
Thanks for the reply Kemal!
|
 |
Kemal Sokolovic
Bartender
Joined: Jun 19, 2010
Posts: 792
|
|
Sorry about that, I reviewed post over phone and missed the class name in the code.
If there is a source code for the book available for download (probably there is, as for the most of the books) you might find the class missing there.
|
 |
 |
|
|
subject: Head First Java - QuizCardBuilder won't compile
|
|
|