...
Code Block | ||
---|---|---|
| ||
package x; public class A { void doLogic() { /* print 'A' */ } public static void main(String[] args) { y.C.doLogicdoSequence(); // explicitly invokes doLogic() of class y.C and prints 'C' } } package x; public class B { /* ... */ } package y; // different package public class C extends x.B { public void doSequence() { /* print 'C' */ } // now publicrenamed } |
Risk Assessment
Reusing names leads to code that is harder to read and maintain and may result in security weaknesses.
...