My Hindi Forum

Go Back   My Hindi Forum > Miscellaneous > Tech Talks
Home Rules Facebook Register FAQ Community

Reply
 
Thread Tools Display Modes
Old 30-12-2009, 09:27 PM   #1
rajesh
Member
 
rajesh's Avatar
 
Join Date: Dec 2009
Posts: 76
Rep Power: 15
rajesh is on a distinguished road
Default Why default constructor of base class will be called first in java?

A subclass inherits all the methods and fields (eligible one) from the base class, so base class is constructed in the process of creation of subclass object (subclass is also an object of superclass). Hence before initializing the default value of sub class the super class should be initialized using the default constructor.
rajesh is offline   Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT +5. The time now is 04:58 PM.


Powered by: vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
MyHindiForum.com is not responsible for the views and opinion of the posters. The posters and only posters shall be liable for any copyright infringement.