hello, i am facing problem in doing an example with partial serialization,iam unable to retrive the object even though i can store.I have 2 class parent and child in my application,where parent do not implement serialization and child implements serialization.In my child class i declare parent class object as transient and parent class has a constructor that takes arguments that i need to pass from child class. I even used private default readObject() and writeObject() and used accordingly but facing problem to retrive object .
can any provide code snippets or example . i will be thank ful to them bye
this is my code snippet iam facing problem can any give solution to it <blockquote>code:<pre name="code" class="core"> package org.an.ps;
There are a whole bunch of little issues here, and I don't know for sure which one you're running into. First, your "main" won't compile, as you're not catching ClassNotFoundException, which readObject() can throw. Second, you can't deserialize your parent class because it has no no-argument constructor, although you won't find that out until you try and get an exception. Third, in one place you mention a class "Wool1" -- I think you just forgot to change that to "B" when you posted the code. It's better to post real code so that sort of thing doesn't happen; in fact I suspect all three of these are just translation issues!
Then the final issue, and perhaps the one you're really having, is shown in these two lines: