This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring 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
jQuery in Action, 3rd edition