I just came across a question that has totally thrown my understanding for a loop. Here is the code.
My understanding is this, Base class does not have a constructor (that is a trick method in there). In extends Base. In doesn't have an explicit constructor too, so it creates a default constructor, or rather the compiler does. This default constructor, presumably will call the super() on it's superClass. However my understanding was that if you have a subClass that calls super(), the superClass has to have a () constructor, that is, it can not rely on the default constructor to handle that. I could swear I've run code to
test that theory out. But I just ran the code above, and sure enough it doesn't through a compile-time error. I am really confused now. Am I somehow confusing this situation with another situation? Please help somebody.