It's not a secret anymore!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes inheriting static members Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "inheriting static members" Watch "inheriting static members" New topic
Author

inheriting static members

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
Are the static attributes and methods of base class inherited in derived class.


SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
Joshua Ebarvia
Ranch Hand

Joined: Sep 25, 2007
Posts: 70
Naresh Chaurasia wrote:Are the static attributes and methods of base class inherited in derived class.


Yes...



Please try this


Lovin' java
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

If it is not private, then it will be inherited to the sub classes.


Krishna Srinivasan
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
 
Consider Paul's rocket mass heater.
 
subject: inheriting static members