aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error declaring an ArrayList" Watch "Error declaring an ArrayList" New topic
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error declaring an ArrayList
 
Similar Threads
QuizCard class not found. (Head First Java 2nd Ed)
New Quiz Card Builder/Player for Exam Study
Runtime Error in Program for Unknown Reasons
HeadFirst >>Chapter14:ArrayList Error
Head First Java QuizCardBuilder not saving files correctly