Can we inherit static members in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the United Nations Office on Drugs and Crime, Lives in Vienna, Austria.
Static methods are inherited in Java but they don't take part in polymorphism. If we attempt to override the static methods they will just hide the superclass static methods instead of overriding them. Static method is inherited in subclass but it is not polymorphism.Apr 24, 2012
2023-06-17 06:42:31
评论(499)
Helpful(122)
Helpful
Helpful(2)

Ava Rodriguez
QuesHub.com delivers expert answers and knowledge to you.
Static methods are inherited in Java but they don't take part in polymorphism. If we attempt to override the static methods they will just hide the superclass static methods instead of overriding them. Static method is inherited in subclass but it is not polymorphism.Apr 24, 2012