Getting compile error when I used the super keyword with unbounded wild card operator | Core Java Forum
Vikrant Feddewar Posted on 22/07/2021

Hi Yogesh,

I have created shape as custom main class then created a Triangle, Circle and Rectangle sub-classes in same class file. Later I have extends the subclass by parent class. I have created a main method and created object of all 4 classes. Now when I created a another static method and using the super keyword then I am getting compile error. If you refer or see 2nd screenshot then I simply mentioned the Circle there it means parent of circle is allowed. then using circle object I am simply calling the parent class method. Please explan where I am going wrong here?