Because it will ensure that when a constructor is invoked, it can rely on all the fields in its superclass being initialised.
see 3.4.4 in here
More Related Contents:
- Java error when I try to create an object with a constructor with a string parameter [closed]
- When do you need to explicitly call a superclass constructor?
- Deep copy of an object array
- constructor of subclass in Java
- How many objects are created due to inheritance in java?
- What does the ‘new’ keyword actually do in Java, and should I avoid creating new objects?
- Creation of Objects: Constructors or Static Factory Methods
- Cannot instantiate the type for class object (Java)
- how to inherit Constructor from super class to sub class
- implicit super constructor Person() is undefined. Must explicitly invoke another constructor?
- Java. Implicit super constructor Employee() is undefined. Must explicitly invoke another constructor [duplicate]
- Why is super.super.method(); not allowed in Java?
- Why are my fields initialized to null or to the default value of zero when I’ve declared and initialized them in my class’ constructor?
- What are classes, references, and objects?
- How to sort an array of objects in Java?
- How do hashCode() and identityHashCode() work at the back end?
- Leaking this in constructor warning
- Why is Class.newInstance() “evil”?
- What exactly is an instance in Java?
- Can I call methods in constructor in Java?
- gson.toJson() throws StackOverflowError
- Is it OK to call abstract method from constructor in Java? [duplicate]
- State of Derived class object when Base class constructor calls overridden method in Java
- How to get the parameter names of an object’s constructors (reflection)? [duplicate]
- Java Lombok: Omitting one field in @AllArgsConstructor?
- Protected constructor and accessibility
- How to serialize object to CSV file?
- How many string objects will be created in memory? [duplicate]
- Duplicating objects in Java
- How can I access a private constructor of a class?