• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HFE page 72

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
thanks
 
stable boy
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic