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 do you mean by thread safe?
Can list have duplicates in java?
What are the properties of thread?
What are the advantages of exception handling in java?
Why string objects are immutable in java?
Garbage collection in java?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
Mention a package that is used for linked list class in java.
write a program that list all permutations of ABCDEF in which A appears before B?
What are java packages? What's the significance of packages?
What is an empty list in java?
What is java autoboxing?
How will you compute size of a structure?
When is the finalize() called? What is the purpose of finalization?