2013年9月23日星期一

java, subclasses inherit the parent class of all non- private , non-static member, then the parent class constructor can be inherited it ?

A class constructor is a member of way to do this ?
------ Solution ---------------------------------------- ----
constructor did not inherit this statement !
------ Solution ---------------------------------------- ----
constructor this thing did not inherit that said,
up to only call the parent class
super ()
super (*)
------ For reference only ------------------------------ ---------

If you can not inherit , is not that : class constructor is not a member of the class methods?
------ For reference only -------------------------------------- -

If you can not inherit , is not that : class constructor is not a member of the class methods?
------ For reference only -------------------------------------- -
member method : simply the instance of the class can be ( an object ) method call , that is, under normal circumstances, we use a method .
constructor : constructor is used to construct a class of objects , methods, and class name does not return the same value . Generally with new constructor method name ( ) to create objects of this class . Do not write constructor in case there is a default constructor with no arguments .
------ For reference only -------------------------------------- -

Yes
------ For reference only ---------------------------- -----------

Thank kiritor pointing.
------ For reference only -------------------------------------- -
not inherit can override oh. ,

没有评论:

发表评论