Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is static methods can't override?

 
kiran nyala
Ranch Hand
Posts: 52
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried following code to check overriding static methods and variables of super class


output:
sub class method1()
super class static method5()
super class x=10

So, finally i came to understand that static methods and variables can not be override, is my view correct?
If no please explin me
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this topic many time discussed here in javaRanch. please search here....

recent thread
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally you will end up finding answers when you SearchFirst
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic