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


Please Help Members By Posting Answers For Below Questions

What is the major advantage of external iteration over internal iteration?

810


What is the purpose of lambda expressions?

781


What do heavy weight components mean in java programming?

698


Is java still necessary?

812


What is meant by string is immutable?

719


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

842


Are arrays primitive data types?

831


What does n mean in java?

705


Why is java called the platform independent programming language?

770


What is set in java?

732


Can interface be private in java?

747


Why do I need to declare the type of a variable in java?

765


Is the milky way in a void?

732


What is double parsedouble in java?

737


How do you create a reference in java?

687