I know I should implement the Cloneable interface and then override the clone() method of the Object class in Test, and this is not my problem . I just do not understand why compiler gives "clone() has protected access in object" error while the Test class is extending the Object!
public class Test extends Object{
public static void main(String[] args) throws CloneNotSupportedException {
Object o = new Object();
o.clone(); } }