Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

HFE page 72

Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this question was raised by Torean ...I spent quite a bit of time to solve it & came up with a question on values() from hashmap returns a collection, what we can do is to fill the returned collection into an arraylist to make the objects surely serializable as the book says, but my question is ?
i went through the AbstractList class and it does not implement
the serializable interface ,may be that is why the returned collection be fed into a known collection implementing class(to make sure that the classs is serializable),
but the book says in 72-page that all collection implementations are serializable ?
please help me & Torean
stable boy
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not too sure what is mentioned in the book.
All the implementation classes of the Collection interface implements the Serializable interface. Have a look to the JDK API doc for HashSet, TreeSet, HashMap, ArrayList, etc.
And inside of my fortune cookie was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic