what is the use of clone method? why user cant overwrite in
sub class without its proper defination.

Answers were Sorted based on User's Feedback



what is the use of clone method? why user cant overwrite in sub class without its proper definatio..

Answer / aravind

When we want to maintaion a local copy of the object we use
clone method. This is to ensure not to modify the callers
object.

Is This Answer Correct ?    3 Yes 0 No

what is the use of clone method? why user cant overwrite in sub class without its proper definatio..

Answer / guest

clone method is used to create copies of an object.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is node a data type in java?

0 Answers  


all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.

4 Answers  


Difference between collection, collection and collections in java?

0 Answers  


What are the names of interfaces that doesn't consists of method/s ?

3 Answers  


What is meant by call by reference?

0 Answers  






What is appletviewer?

0 Answers  


when to for abstract class and when to go for interface

2 Answers  


You're given a Boolean 2D matrix, can you find the number of islands?

0 Answers   Amazon,


What does += mean in java?

0 Answers  


What is the purpose of assert keyword used in jdk1.4.x?

0 Answers  


What is a treeset in java?

0 Answers  


How can you generate random numbers in java?

0 Answers  


Categories