File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error declaring an ArrayList

 
Peter C. Sandgaard
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 874
Android Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 105
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic