aspose file tools
The moose likes I/O and Streams and the fly likes Writing collection to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Writing collection to a file" Watch "Writing collection to a file" New topic

Writing collection to a file

Jd Hanson

Joined: Feb 18, 2012
Posts: 2

I get an error for something I think should work:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method get(Integer) is undefined for the type Collection<MyCal>

This is the offending line:

Thanks for you help !

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31634

get(int) is defined on List, not Collection. You can either pass in a List or change the implementation.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Don't get me started about those stupid light bulbs.
subject: Writing collection to a file