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 about main() method in java ?

1053


What is a subsequence of a string?

1119


Define max and min heap, also the search time of heap.

1075


What is the preferred size of a component in java programming?

1048


What comes to mind when someone mentions a shallow copy in java?

1164


In java, how many ways you can take input from the console?

1045


How many inner classes can a class have?

1089


How dead lock situation occurs in java and how you can identify it?

1052


Differentiate between a class and an object.

1073


Can a top level class be private or protected?

1097


Is java 11 paid version?

1048


Is empty list java?

975


What two classes are used to read data only?

1138


What is difference between classpath and path variables in java?

1259


What is a singleton class? Give a practical example of its usage.

1147