Every class extends object but why it is not possible for
every object to invoke clone() method. ideally protected
methods should be accessible from sub classes. isn't it?
Answer Posted / surendrababu koppula
clone() method must be called on only cloneable objects so sub class must implement Cloneable marker interface
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How do you sort in descending order in java using collections sort?
How do you add an element to a set in java?
What is purpose of applet programming?
What is an iterator interface in java programming?
What is the base class for error and exception?
What are the data types supported by java?
What is the difference between scrollbar and scrollpane?
What is a boolean used for?
what is encapsulation in java? Explain
Is the empty set a singleton?
What is collection class in java? List down its methods and interfaces.
How many bits is size_t?
What is the purpose of file class?
What is the multi-catch block in java?
How to display arraylist values in java?