Can the main method be overridden?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at University of California, Los Angeles (UCLA), Lives in Los Angeles, CA
We can not override the static method because static metod is a class method and the scope of this method within the same class itself. ... Hence, it does not makes sense to "override" it (or for that matter any static method). The concept of "overriding" is only for instance methods.
2023-06-18 06:42:31
评论(499)
Helpful(122)
Helpful
Helpful(2)

Harper Phillips
QuesHub.com delivers expert answers and knowledge to you.
We can not override the static method because static metod is a class method and the scope of this method within the same class itself. ... Hence, it does not makes sense to "override" it (or for that matter any static method). The concept of "overriding" is only for instance methods.