Mitch Pronschinske is the Senior Content Analyst aka. the CZO (Chief Zones Officer) aka. "Lord of the Zones" at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. My G+ Profile Mitch is a DZone Zone Leader and has posted 2017 posts at DZone. You can read more from them at their website. View Full User Profile
Lucene Revolution 2012 Stats and Opening Presentation
Paul Doscher, the CTO Lucid Imagination, looks at the stats for this year's Lucene Revolution conference and gives an overview of what's new at Lucid Imagination.
Daniel Slazer replied on Tue, 2012/06/12 - 12:37pm
"Base class object is also get created "
No, You just invoke the parent class 's constructor because SubClass is inherited from BaseClass.
In your TestInheritance Class ,there is only a BaseClass reference (not object) ,you can invoke the method() ,
but it is not from BaseClass ,it is from SubClass(you create an object of SubClass).
Comments
Daniel Slazer replied on Tue, 2012/06/12 - 12:37pm
No, You just invoke the parent class 's constructor because SubClass is inherited from BaseClass.
In your TestInheritance Class ,there is only a BaseClass reference (not object) ,you can invoke the method() ,
but it is not from BaseClass ,it is from SubClass(you create an object of SubClass).