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...

what is the use of clone() in real time scenario?

Answer Posted / aravindareddy

Clone() method is used to create and return copy of the
object,The Cloneable interface defines a method called Clone
(), which can be used to clone an object in your java
program.The reason for making a copy of an object is if
you’re going to modify that object and you don’t want to
modify the caller’s object. If you decide that you want to
make a local copy, you simply use the clone() method to
perform the operation.

Is This Answer Correct ?    28 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is better - 'bit-shift a value' or 'multiply by 2'?

1192


What is meant by method?

1106


What is a ternary operator in java?

982


What is the difference between class forname and new?

1006


Can we write a class without main method in java?

959


How is the marker interface used in Java?

1100


Why Java is not pure Object Oriented language?

1111


Why set do not allow duplicates in java?

1104


Why heap memory is called heap?

1048


Can list contain null in java?

1087


Why unicode is important?

940


What is the purpose of tostring() method in java?

1158


State some advantages of java?

1242


How do we access static members in java?

1111


How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?

963