Every class extends java.lang.Object
by default, even if not specified. If there is construction to be done in Object
that isn't done in SuperExample
, then the call to super()
in SuperExample.SuperExample()
will make sure that processing happens.
Now, you're right in that the super()
call isn't really necessary in this case, because Object
doesn't actually do anything in particular in its own constructor. But your IDE will insert the call to super()
anyway, because, well, why not? Including a call to super()
is good practice even if the superclass doesn't do anything important in its constructor, because maybe sometime in the future it will.
It'd be more effort for Eclipse to check that your class extends something other than Object
before auto-generating the super()
call in the constructor. And doing so doesn't hurt anything, so why waste the effort optimizing it? That's the main reason.