wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Override Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Override" Watch "Override" New topic
Author

Override

Duleep Thivanka
Greenhorn

Joined: May 23, 2008
Posts: 10
"static methods cann't be override".Is this statement correct? :roll:
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

Hi Duleep,

welcome to the ranch

This statement is correct! Polymorphism and overriding doesn't work for static (class) methods. You can only override non-static methods.

Marco
Duleep Thivanka
Greenhorn

Joined: May 23, 2008
Posts: 10
Originally posted by Marco Ehrentreich:
Hi Duleep,

welcome to the ranch

This statement is correct! Polymorphism and overriding doesn't work for static (class) methods. You can only override non-static methods.

Marco
Duleep Thivanka
Greenhorn

Joined: May 23, 2008
Posts: 10
Thanks Macro...
 
Don't get me started about those stupid light bulbs.
 
subject: Override
 
Similar Threads
Moving object on keyEvents FAILING !
override
generics problem
Overriding
Equals and Hashcode