This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
jQuery in Action, 2nd edition
 
subject: Serializing a class instance which doesn't implement Serializable interface
 
Similar Threads
WA #1.....word association
Cant use object from another class
Posting to bump up my count...
media player applet
The x900 effect ?