Can a method be static and abstract?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at Microsoft, Lives in Redmond, WA
An abstract method is defined only so that it can be overridden in a subclass. However, static methods can not be overridden. Therefore, it is a compile-time error to have an abstract, static method. ... It's because static methods belongs to a particular class and not to its instance.Dec 16, 2008
2023-06-15 06:42:39
评论(499)
Helpful(122)
Helpful
Helpful(2)

Harper Jimenez
QuesHub.com delivers expert answers and knowledge to you.
An abstract method is defined only so that it can be overridden in a subclass. However, static methods can not be overridden. Therefore, it is a compile-time error to have an abstract, static method. ... It's because static methods belongs to a particular class and not to its instance.Dec 16, 2008