Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how can u apply shallow cloning and deep cloning to create
object?



how can u apply shallow cloning and deep cloning to create object?..

Answer / kiran sonaje

Hi,

Please refer below link for shallow cloning

http://www.java2s.com/Code/Java/Language-
Basics/ShallowCopyTest.htm

and for deep cloing
http://www.java2s.com/Code/Java/Language-
Basics/DeepCopyTest.htm

Please please observe clone method to get more
clarification between deep and shallow cloning

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More Core Java Interview Questions

What do you mean by a JVM?

0 Answers   GE,


How to re-get an object that is collected by garbage collector?

1 Answers  


State some advantages of java?

0 Answers  


What is substring 1 in java?

0 Answers  


What is anonymous inner class?

0 Answers  


What is the difference between instanceof and isinstance?

0 Answers  


How to read and write image from a file ?

0 Answers  


How does the garbage collector works in java?

0 Answers   Cyient,


Is java 9 released?

0 Answers  


Why do we need hashmap in java?

0 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

0 Answers  


Categories