I have to serialize Collection and Set interfaces. Which are the best Serializable replacements for those interfaces on Java?
I have to serialize Collection and Set interfaces. Which are the best Serializable replacements
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set is an Interface.
Use HashSet that are implementing Set and HashSets are serializable.
Just be sure that all the objects in the Set is serializable.
For more info Why java.util.Set is not Serializable?
PS. It doesn’t have to be a HashSet; use any concrete class that is serializable and implementing Set or Collection.