Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find if the class is serializable?

 
Sharmistha Sarkar
Ranch Hand
Posts: 50
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have serialized a class.How could I be sure or test whether the class has been serialized correctly or not with the proper value?


I have gone through a site http://www.ibm.com/developerworks/library/j-serialtest/index.html , but specify code snippet under "Listing 1. Is the class serializable?" section; I could not establish it properly with my example.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Listing 1 is useless to you because you already know the class is serializable. (You declared it that way in line 3 of your posted code.)

Now have a look at listing 2, which closely resembles the code you already have.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic