Arhaan Singhania wrote:Hello Stephan,
It worked well for the first three instantiations. I was just wondering. Ofcourse compiler allows it means we can do that.
But i was just asking, how come Engine is allowed without its parent name.
Arhaan
Because of the scope. You are using the Engine identifier from the main method inside the AirJet class. Since the scope is already inside AirJet, it assumes you are referring to the inner class Engine. You would not be able to do this if you used Engine outside the AirJet class, then you would have to use AirJet.Engine instead.