Can you override a static method? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Can you override a static method?

Give me an explanation why

14th Aug 2017, 11:40 AM
Recon
Recon - avatar
2 Respostas
+ 3
I don't think so bro
14th Aug 2017, 2:27 PM
MR.FAKER
MR.FAKER - avatar
+ 1
No you can't. Why would you want to do so ? You can hide a static method in a derived class. It looks like you have overriden it, but actually you have defined a whole new method. It is not good practice. https://code.sololearn.com/cwtwY5w0EukX/#cs
14th Aug 2017, 10:19 PM
sneeze
sneeze - avatar