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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is native code?

1203


What is a private class in java?

1121


What is meant by inheritance and what are its advantages?

1162


What is private protected in java?

1096


What is the point of polymorphism java?

1069


How does split work in java?

1103


What is array pointers ?

1086


What is the purpose of final keyword and when to use it?

1055


Why parsing is done?

1028


What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?

1198


Why can we not override static method?

1148


Where is singleton pattern used?

1040


What are identifiers in java?

1193


What are different types of inner classes ?

1100


How does enum work in java?

1068