Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

static  RSS feed

 
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Basic Doubt.................Why static method can not be abstract?Please explain it in relation to implementation
[ September 30, 2005: Message edited by: agrah upadhyay ]
 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean to ask ?
 
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi agrah...

Didnt quite get you...Can you elaborate a little about the statement??

 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry now i have edited my post
 
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Static methods pertain to a class and do not require an instantiated object. Abstract methods must be implemented by an instance; they require an instantiated object, therefore it makes no sense to have a static abstract method.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If a method has abstract....specifier it has to be implemented...

Now if it had the specifier static...then that becomes

a class specific method...


static makes it class specfic and yet with abstract you want to implement that in another class..

This is only explanation on the matter I have ...can be wrong ..


[ September 30, 2005: Message edited by: A Kumar ]
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
static methods CANNOT BE OVERRIDDEN, they can only be HIDDEN, and an abstract method HAS to be overridden which is impossible
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!