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 about main() method in java ?
What is a subsequence of a string?
Define max and min heap, also the search time of heap.
What is the preferred size of a component in java programming?
What comes to mind when someone mentions a shallow copy in java?
In java, how many ways you can take input from the console?
How many inner classes can a class have?
How dead lock situation occurs in java and how you can identify it?
Differentiate between a class and an object.
Can a top level class be private or protected?
Is java 11 paid version?
Is empty list java?
What two classes are used to read data only?
What is difference between classpath and path variables in java?
What is a singleton class? Give a practical example of its usage.