File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
It's not a secret anymore!