wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Why abstract methods cannot be static? 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 "Why abstract methods cannot be static?" Watch "Why abstract methods cannot be static?" New topic
Author

Why abstract methods cannot be static?

Leonardo Crespo
Ranch Hand

Joined: Jul 03, 2005
Posts: 31
Simple one:

Why abstract methods cannot be static?



Thank you very much.

Leonardo.


Leonardo Crespo
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Abstract methods must be overriden in the concrete child class that extends this abstract class. But static methods cannot be overriden , it dosen't involve in polymorphic behaviours, it belongs to a particular class and not to a instance. Hence it cannot be combined with abstract methods.
[ July 28, 2005: Message edited by: Srinivasa Raghavan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Leonardo Crespo
Ranch Hand

Joined: Jul 03, 2005
Posts: 31
Wow Srinivasa , you were fast! Thanks for the explanation!
Arulkumar Gopalan
Ranch Hand

Joined: Oct 13, 2003
Posts: 104
but, static methods can be separately overridden though, which is class specific.


Anbudan & Mahalo,<br />Arul<br /> <br />-Not a sun certified Java professional :-)
 
 
subject: Why abstract methods cannot be static?
 
Similar Threads
static methods
Why methods in an interface cannot be static?
why, if one method is declared as abstract, the same cannot be declared as static ?
Java Basics
interfaces