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

Can you override a private or static method in Java?

17th Apr 2017, 2:45 PM
Adarsh Roshan
Adarsh Roshan - avatar
2 Respostas
+ 1
The distinction between hiding a static method and overriding an instance method has important implications: -The version of the overridden instance method that gets invoked is the one in the subclass. -The version of the hidden static method that gets invoked depends on whether it is invoked from the superclass or the subclass. More details with examples: https://docs.oracle.com/javase/tutorial/java/IandI/override.html
25th Apr 2017, 9:20 PM
Andrey Lada
Andrey Lada - avatar
+ 1
hello if you are using WhatsApp on anything like it please give me your phone number
19th Oct 2017, 11:03 AM
Raj Chhatrala
Raj Chhatrala - avatar