Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Beginning Java and the fly likes Error declaring an ArrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error declaring an ArrayList" Watch "Error declaring an ArrayList" New topic

Error declaring an ArrayList

Peter C. Sandgaard

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 ??


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...
I agree. Here's the link:
subject: Error declaring an ArrayList