Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

true or false

 
sun par
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I right in thinking that an abstract method cannot be static
Thanks
 
Junilu Lacar
Bartender
Pie
Posts: 7273
44
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. An abstract method will be overridden in a subclass. Static methods cannot be overridden; they do not participate in polymorphism.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sunita - even though I'm going to pick on your thread, I mean this as a general guideline in this forum (and all over the Ranch, for that matter).
PLEASE, give your threads good subject lines. A subject like true or false doesn't tell anyone much about the question, unless it has something to do with boolean primitives, which this question does not.
We have a search utility here at the Ranch that allows you to look back through previous posts to find all sorts of great information. However, finding what you're after is awfully difficult if all of the subject lines read things like "true or false" or something else that doesn't really describe the problem.
I don't mean to pick on you, Sunita - this thread just happened to catch my eye. I've seen lots of people that have been hanging around for quite a while do stuff like this. So, please, name your threads well.
Corey
 
sun par
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Noted. Shall give meaningful subject lines henceforth.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic