GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 452 of 493    Print  
What is Shallow cloning in Java ?

  
Total Answers and Comments: 4 Last Update: July 08, 2008     Asked by: fred 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: nareshv1
 
When we need a copy of the object we go for cloning.
When an object is shallow coned the parent object or top level object and its members are duplicated, where as the low level objects are not duplicated but their references are alone copied.

Above answer was rated as good by the following members:
Naveenjavasun
November 30, 2007 03:22:24   #1  
tryingtobejavageek Member Since: November 2007   Contribution: 1    

RE: What is Shallow cloning in Java ?
Shallow cloning is a way to create a replica of object where object copy is created but the objects that are contained in that object are not copied.
 
Is this answer useful? Yes | No
February 14, 2008 00:57:27   #2  
sampra Member Since: February 2008   Contribution: 279    

RE: What is Shallow cloning in Java ?
Shallow cloning is a way to create a replica of object where object copy is created but the objects that are contained in that object are not copied.
 
Is this answer useful? Yes | No
June 13, 2008 02:24:17   #3  
nareshv1 Member Since: June 2008   Contribution: 2    

RE: What is Shallow cloning in Java ?
When we need a copy of the object we go for cloning.
When an object is shallow coned the parent object or top level object and its members are duplicated, where as the low level objects are not duplicated but their references are alone copied.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 08, 2008 04:02:55   #4  
Naveenjavasun Member Since: July 2008   Contribution: 6    

RE: What is Shallow cloning in Java ?
When we need a copy of the object we go for cloning. When an object is shallow coned the parent object or top level object and its members are duplicated, where as the low level objects are not duplicated but their references are alone copied.

For complete cloning go for deep cloning
Deepcloing is done in two ways 1,serilization and 2,cloning all related objects.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape