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
Can we inherit inner class?
What is string in java is it a data type?
What is the difference between int and integer in java?
Write a program to solve producer consumer problem in java?
What is prime number in java?
How will you add panel to a frame?
What is the difference between processes and threads?
What are the data types supported by java?
What are pass by reference and pass by value?
what is the difference between thread and runnable types? : Java thread
Is a class an object?
How do you sort in descending order in java using collections sort?
Explain naming conventions for packages?
What is the type of lambda expression?
Can a set contain duplicates?