I am afraid that isn't quite correct; that calls a no‑arguments construtor in the base class/superclass, and that might not be a default constructor.
Christoph Schreiber wrote:. . . default constructor . . .
I haven't tried that sort of code; I don't think it has a “real” use, and I suspect it won't even compile.
Earlier this morning, I wrote:xyz.super.foo()
You mean the enum constant is returned. The method is obviously called on the same object as we are in, and it doesn't take a parameter, so it is not at all clear how it works.
Kevin O'Sullivan wrote:. . . It returns the enum type depending on which char value is entered,How would you go about writing it?
Kindly don't call me “bro”.
Akash bhamri wrote:@Campbell Ritchie that one is solved bro now how can I do this one . . .