aspose file tools
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 The Software Craftsman this week in the Agile 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: 1283

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!

Have you tried LearnNowOnline?
subject: about abstract and static