• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serializing a class instance which doesn't implement Serializable interface

 
Sahil Manchanda
Ranch Hand
Posts: 41
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to serialize an object which does not implement serializable and it worked ... how is this possible?
i am working on eclipse.
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you please elaborate your problem ? Post your program here so that we have more information regarding what is happening ?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that's possible. you have to serialize/write that object *properties* which can be serialized in writeObject()
and get the properties back and assemble in readObject().

Search for
 
Sahil Manchanda
Ranch Hand
Posts: 41
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gurpeet singh wrote:could you please elaborate your problem ? Post your program here so that we have more information regarding what is happening ?





\\and now my dog class ..



\\ collar class





 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

exception is hiding here... go and find it!
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Sahil Manchanda : Please use code tag, while applying code. see now how good is that
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic