| Author |
Error declaring an ArrayList
|
Peter C. Sandgaard
Greenhorn
Joined: Jun 01, 2006
Posts: 2
|
|
I am trying to create a program with an ArrayList, but the compiler (Eclipse) gives me the error that "QuizCard" cannot be resolved to a type ??
Code:
|
 |
Balu Sadhasivam
Ranch Hand
Joined: Jan 01, 2009
Posts: 874
|
|
ArrayList , in general any Collection can hold only Objects. In this ArrayList<QuizCard> , QuizCard must be user defined class.By the way is typo error or missed importing the class QuizCard ? QuizCard class must be available in teh classpath .
|
 |
Shashank Agarwal
Ranch Hand
Joined: May 20, 2004
Posts: 105
|
|
|
The compiler is not able to figure out what QuizCard is. You'd have to import it...
|
 |
 |
|
|
subject: Error declaring an ArrayList
|
|
|