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
What happens if a constructor is declared private?
What is the final access modifier in java?
How much is a java license?
how are methods defined?
Is vector thread safe in java?
What are new features introduced with java 8 ?
What is a singleton in genetics?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
What are the new features in java 8? Explain
What is the concatenation operator in java?
In Java list the methods that can be overridden?
What is double in java?
What is an immutable class? How to create an immutable class?
Define linked list and its features with signature?
What is class forname?