I found a class like this:
public class Computer implements Serializable {
private static final long serialVersionUID = 1L;
//...
In Java, Object
class is at the top of the Class
hierarchy. Implicitly, All the Classes are implicitly of Object
type. Invocation of super()
method is not needed explicitly in code. But, this will be added by the compiler during conversion of Class into bytecode. so, the first line in any constructor would be invocation of super()
implicitly by default. Construction of an object includes all the invocation of default constructors of Super classes. But, you can also call a customized argument constructor of the super
class in your class
constructor.