GeeCON Prague 2014*
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


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 :-)
 
GeeCON Prague 2014
 
subject: Why abstract methods cannot be static?