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 does three dots mean in java?
What is the difference between static (class) method and instance method?
What is defined as false sharing in the context of multithreading?
What is a generic code?
What are different types of references?
Which types of exceptions are caught at compile time?
What is the difference between call by reference and call by pointer?
Write a program to reverse array in place?
Can we extend singleton class?
What is factor r?
What is a copy constructor in java?
What is the static block?
What are the classes of java?
What environment variables are required to be set on a machine in order to run Java programs?
What is * argv?