Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Serializing a class instance which doesn't implement Serializable interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Serializing a class instance which doesn Watch "Serializing a class instance which doesn New topic
Author

Serializing a class instance which doesn't implement Serializable interface

Sahil Manchanda
Ranch Hand

Joined: Jul 24, 2012
Posts: 41

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

Joined: Apr 04, 2012
Posts: 924
    
    1

could you please elaborate your problem ? Post your program here so that we have more information regarding what is happening ?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jul 24, 2012
Posts: 41

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

Joined: Jan 28, 2008
Posts: 5575


exception is hiding here... go and find it!
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

@Sahil Manchanda : Please use code tag, while applying code. see now how good is that
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Serializing a class instance which doesn't implement Serializable interface
 
Similar Threads
Cant use object from another class
media player applet
WA #1.....word association
Posting to bump up my count...
The x900 effect ?