GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 23 of 31    Print  
Serializable is used to read or write the object and find the state of an object. What is the use of finding the state of an object, Explain with an example?

  
Total Answers and Comments: 5 Last Update: April 21, 2009     Asked by: gobinath.l 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 24, 2007 02:59:40   #1  
pavan        

RE: Serializable is used to read or write the object a...
Serializable is the concept of saving the state of an object.
 
Is this answer useful? Yes | No
February 13, 2008 04:28:02   #2  
sampra Member Since: February 2008   Contribution: 278    

RE: Serializable is used to read or write the object and find the state of an object. What is the use of finding the state of an object, Explain with an example?
If we have to use an object on remote mechine then we ned that data for this we neede serilizaion technique

 
Is this answer useful? Yes | No
April 17, 2009 10:57:36   #3  
ravi_1229 Member Since: November 2006   Contribution: 9    

RE: Serializable is used to read or write the object and find the state of an object. What is the use of finding the state of an object, Explain with an example?
Serializable is the concept of Storing the state of an Object. Consider a
scenario you want to send an object via network. In the middle if the network fails or some error happens your object state will be lost.
for ex: String is an serializable object. if you want to send a data via network we usually send in String because the object state may not be lost as String is serializable object.

 
Is this answer useful? Yes | No
April 19, 2009 21:07:54   #4  
richakharya Member Since: December 2007   Contribution: 11    

RE: Serializable is used to read or write the object and find the state of an object. What is the use of finding the state of an object, Explain with an example?
When the object supposed to be sent across the network serializing technique makes sure the data is not lost in case of network failure. Seralizaing is converting the object to its byte code form and then sending it accross the network.
 
Is this answer useful? Yes | No
April 20, 2009 01:19:19   #5  
VenkitaKrishnan Member Since: April 2007   Contribution: 7    

RE: Serializable is used to read or write the object and find the state of an object. What is the use of finding the state of an object, Explain with an example?

The concept of Serializable is that we can recreate the state of an object from a permanent source like a file xml etc.

Example: I had personally implemented used in scenario where i had an organization which had their main offices in California with branch offices in various other states. The branch offices used to have a front end where the orders received were saved for their details like Order Id Party Name Order Amount etc. Then at the end of the day all these files were ftp'ed to the Head Office and it was read back from the file.

The state of the order was serialized or persisted and then recreated and used again in the head office. We could ofcourse have used the normal File Streams for that but then we could not consider it as an object and move on with it.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape