1 coverage
An instance method can overwrite all instance methods with the same signature that can be accessed in its superclass, enabling the use of dynamic allocation mechanisms. In other words, the VM chooses the replication method to invoke based on the type of the run time. Overwrite is the basis of object-oriented programming technology.
class base{ publicvoid f () {} }classextends base{ Public void f ();}
View Code
2 Hidden
A field, a static method, or a member type can hide all fields, static methods, or member types that have the same name (the same method signature for a method) that can be accessed in its superclass, hiding a member that prevents it from being inherited.
class base{ publicstaticvoid f () {} }classextends base{ publicstaticvoid f () {}// hidden Base.F () }
View Code
3 overloading
Methods in a class can overload another method, as long as they have the same name and different signatures. The overloaded method specified by the call is selected at compile time.
class circuitbreaker{publicvoid f (int i) {}//int overloading publicvoid F (string s) {}// string overloading}
View Code
Glossary of Java name reuse