Quote:
Books (Deitel and Deitel) say that java.lang.Object is automatically inherited in EVERY program
I would say: "every class inherits from
java.lang.Object
". That's true.
Quote:
but the second class file doesn't show it?
Because it shows just the immediate super class of
simple1
. The latter inherits from
java.lang.Object
via
JOptionPane
(and probably other intermediate classes, that is you have an inheritance chain). This mechanism is NOT multiple inheritance: you have multiple inheritance when a class directly inherits from two (or more) super classes.
Quote:
What is the parent class in java?
The parent class is the direct ancestor (in the inheritance chain) of a class (
super
provides a way for accessing it, in
Java
).