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
What steps are taken when the OS shifts from one-thread execution to another?
explain autoboxing in java?
What is lifetime variable?
What is the difference between a local variable and an instance variable?
What is hashing in java?
What is unicode used for?
What does you mean in math?
What are the different types of java?
Which sort is best in java?
What is difference between static and final?
Can we execute a program without main?
How do you create a bulleted list?
What is the use of list in java?
What is mean by exception?
What is the name of the java compiler?