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 many types of cloning?

Answer Posted / seventh k

hey,this is core java section,isn't it?

Object's clone() is a method in JavaProgrammingLanguage,for
object duplication,to copy the functionality of a
class.Class Object's clone() creates and returns a copy of
the object,with the same class and with all the fields
having the same values.Object.clone() throws a
CloneNotSupported exception,unless u implement marker
Interface Cloneable.

two types of clonning:
1. Shallow Clonning: this is the default implementation
of Object.clone(), the clone will be a protected one.

2. Deep Cloning:classes must override clone(),to get the
Deep clonning.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use variables?

993


Explain the difference between throw and throws in java?

1003


What is the difference between length and size in java?

991


What is generic type?

1030


Can java run on google chrome?

1195


Which java ide is used the most?

1009


What is difference between an object and a class?

1126


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

2340


What is the difference between break and continue statements?

1040


Does set allows null in java?

962


What is a variable analysis?

1089


What is hashing in java?

1041


What is finalize()? Is finalize() similar to a destructor?

965


Can a class be private in java?

994


How do you remove an object from an arraylist in java?

972