The object that you’re extending,Event
, does not have a constructor that takes no arguments. So you need to call super
and specify arguments like you do in your other constructor.
More Related Contents:
- Why i can’t initialize variable in parent class’ constructor? [closed]
- What’s wrong with overridable method calls in constructors?
- Java Constructor Inheritance
- In what order do static blocks and initialization blocks execute when using inheritance?
- Inheritance in Java – creating an object of the subclass invokes also the constructor of the superclass. Why exactly?
- State of Derived class object when Base class constructor calls overridden method in Java
- Why are constructors not inherited in java?
- order of constructor calls in multilevel inheritance in java [duplicate]
- how to inherit Constructor from super class to sub class
- Does an instance of superclass get created when we instantiate an object?
- Initialize field before super constructor runs?
- Type mismatch: cannot convert from double to double[]
- How do I call one constructor from another in Java?
- Should I instantiate instance variables on declaration or in the constructor?
- Why is there no multiple inheritance in Java, but implementing multiple interfaces is allowed?
- Default constructor vs. inline field initialization
- Why do we assign a parent reference to the child object in Java?
- Is polymorphism possible without inheritance?
- Calling super super class method
- Constructor synchronization in Java
- Builder Pattern and Inheritance
- Are static variables inherited
- extends of the class with private constructor
- Java method overriding and variable shadowing
- Java: accessing private constructor with type parameters
- Java N-Dimensional Arrays
- Anonymous vs named inner classes? – best practices?
- Java overloading and inheritance rules
- What are the negative aspects of Java class Stack inheriting from Vector?
- Difference between a no-arg constructor and a default constructor in Java