File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes about abstract and static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "about abstract and static" Watch "about abstract and static" New topic

about abstract and static

Santhi Bharath
Ranch Hand

Joined: Jun 03, 2008
Posts: 75
why we cant use abstract and static keywords to a method at a time

thanks and regards<br />Santhi Bharath<br />SCJP 5.0, SCWCD 5.0
Marco Ehrentreich
best scout

Joined: Mar 07, 2007
Posts: 1278

Hi Santhi,

welcome to the JavaRanch

An abstract method can't be static because you can call any static method (even without having an object instance of the corresponding class). But you aren't allowed to call abstract methods because they don't have an implementation. Abstract methods are only method prototypes - a skeleton for methods.

For this reason it doesn't make sense to have a method which is both - static and abstract!

Consider Paul's rocket mass heater.
subject: about abstract and static
Similar Threads
Java Basics
why can't abstract class have abstract static method?
Static Methods in an Interface
Mughal Q4.26
abstract static method