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

What do you mean by thread safe?

958


Can list have duplicates in java?

888


What are the properties of thread?

910


What are the advantages of exception handling in java?

1038


Why string objects are immutable in java?

1027


Garbage collection in java?

990


Can subclass overriding method declare an exception if parent class method doesn't throw an exception?

1049


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

966


Mention a package that is used for linked list class in java.

942


write a program that list all permutations of ABCDEF in which A appears before B?

2466


What are java packages? What's the significance of packages?

1298


What is an empty list in java?

954


What is java autoboxing?

931


How will you compute size of a structure?

1149


When is the finalize() called? What is the purpose of finalization?

1059