1) when you create a class and compile it and open and see the class using javap command .. that class file contains that it extends java.lang.object and a default constructor is created automatically..... But when you extends another class the java.lang.Object class is not appeared as extended why?
Code example:
1St Case ----- Java code:
public class temp(){
}
Javap Code:
public class temp() extends java.lang.Object {
public temp(){
}
}
2nd case --- Java Code:
public class temp() extends dummy{
}
javap Code:
public class temp() extends dummy{
public temp(){
}
}
why for the above scenario it doesn't extends object class .. if it does implicitly then why it did not do in the first case instead why did the compiler extends Object class ?