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 are the types of methods in java?

578


What is the use of put method?

514


What is regex in java?

527


What is the maximum size of hashmap in java?

535


What is the use of http-tunneling in rmi?

549






What is int argc char * argv?

565


In java, what is the difference between method overloading and method overriding?

578


What is basic syntax?

547


Can final class have constructor?

497


What is substring in java?

615


what is a working thread? : Java thread

548


Write a program based on Java script program.

643


If a method is declared as protected, where may the method be accessed in java programming?

496


What is meant by tab pans?

645


What are the new features in java 8? Explain

555