This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can a Static Method Be Overriden?  RSS feed

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 'Complete Java 2 Certification Study Guide' states that 'A static method may not be overriden to be non-static.' This implies that it can only be overridden by a static method. However, according to a mock exam, the statement 'Static methods can be overridden by static methods only' is said to be false. Could someone please clarify.
Thanks very much.
 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question was answered a couple of days ago
 
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so after having a look at the answers that John provided the link to, it seems that not only can a static method NOT be overridden to be a non-static method, a static method can NOT be overridden AT ALL.
...a static method can only be hidden.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!