How to resolve an Error on a constructor? [closed]

I am not sure what you are trying to achive, but regarding your compilation issue, I notice two errors in your code:

  1. Remove the call super(texte) from Time constructor, as the class doesn’t extend any other class, so you cannot invoke any constructor of superclass.

  2. The constructor Time(Build, String) accept a Build instance as first parameter, so you cannot pass this when instantiate Time variable inside CalculAction, because it would refer to the instance of CalculAction class, but you have to pass the instance member fenetre, in this way:

    Time Time = new Time(fenetre, “Time”);

Leave a Comment