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
Why do we use variables?
Explain the difference between throw and throws in java?
What is the difference between length and size in java?
What is generic type?
Can java run on google chrome?
Which java ide is used the most?
What is difference between an object and a class?
how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)
What is the difference between break and continue statements?
Does set allows null in java?
What is a variable analysis?
What is hashing in java?
What is finalize()? Is finalize() similar to a destructor?
Can a class be private in java?
How do you remove an object from an arraylist in java?