+ 8
Calling constructor of interface?
Below is the code, I need to know why the code don't give error on line 7 when we are calling an interface's constructor in the constructor of a class which is implementing that interface. https://code.sololearn.com/ce4ek30IQm90/?ref=app
5 Respostas
+ 1
Here, read this:
https://stackoverflow.com/questions/31019157/how-do-all-classes-inherit-from-object
I'm really bad explaining
+ 7
Can you explain what does line 7 exactly doing?
+ 7
neo.h thnx now I understood it.
+ 6
neo.h I couldn't understand what do you mean by Object class's constructor? Can you elaborate more?
+ 1
You're not actually calling the interface's constructor.
See, all classes in java inherit from the Object class, so you're calling the Object class' constructor