Can we serialize objects with only private variables in Java ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. Can we serialize objects with only private variables in Java ?Core Java
Ans. It depends on how we are serializing. The Serialization API doesn't worry about private variables and convert it into binary representation.

If we are using a library to map it to JSON / XML using XML Mappers, it may create trouble.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     serialization


Related Questions

  What is Serialization ? Why do we need it ?
 Can we declare static variables as transient ?
 Which elements of a class are ignored during serialization ?
  Can we serialize static variables ?
  What one should take care of, while serializing the object?
  What is the use of Transient Keyword ?
 serialization and deserialization of singleton class
  Difference between Serialization and Deserialization ?
  What is an Externalizable interface ?
  Difference between serializable and externalizable interface ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: