super must be the first line in a constructor.
8.8.7. Constructor Body
The first statement of a constructor body may be an explicit invocation of another constructor of the same class or of the direct superclass (§188.8.131.52).
this() calls another constructor in the same class.
super() calls a super constructor.If no
super() is explicitly written,the compiler will add one implicitly. Hence, you will end up calling
So, both are not allowed.
In context of your code : remember,
super() should always be the first line in a constructor.
Upon further reflection my answer as it was below is basically correct but lacking some nuance. Essentially, you can call a super constructor once. This is to ensure your super class is only constructed once. This means that the first line of a given constructor can be a call to another constructor in the current class or a call to a constructor in the super class. This also means that you can only call another constructor once in any given constructor; you must choose to call one in the current or super class. This ensures that all super classes will be fully constructed before the current object is.
The fundamental reason is that all super classes must be constructed before the subclass can be. To this end, Java will implicitly call super() if no such invocation exist on the first line of a constructor. The only way to override this behavior is to explicitly call a different constructor in your super class. Basically, Java must create your hierarchy before you can be created.
Putting your constructor first violates this requirement and therefore is illegal.