I have 2 objects inside one object(vector). how can i
serialize one of them. I dont want to serialize the second one

Answer Posted / saroj kumar biswal

this answer is not correct. bcz java compiler will throw an error-illegal declaration of statement.check it out.

I think we will go for Externalizable interface. But the problem is how write the code inside writeExternal() & readExternal() methods

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the dynamic behavior of core java?

628


How does varargs work in java?

603


What is the technique adopted to create an immutable class?

519


What are the actions that can occur when a thread enters blocked state?

573


What is the difference between comparison done by equals method and == operator?

567






In java, what is the difference between method overloading and method overriding?

576


What is the right data type to represent a price in java?

562


Why are constructors used?

550


What is difference between overloading and overriding in java?

523


How to compare strings in java?

497


Can a class be defined inside an interface?

555


Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

524


What is t in generics in java?

555


What is boolean in java?

507


How do you convert string to int in java?

551