Forums Register Login

HFE page 72

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 806 times.
Similar Threads
Collections, Serializable and legal return types
HFEJB - serializable?
FindByXXX( ) method in Entity beans
HF-eJB page no. 72
Collections which are serializable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:39:23.