Community
Participate
Working Groups
Doesn't show cannot override show() in A attempting to assign weaker access privileges as it is supposed to and compiles without error class A{ void show() { System.out.println("konichwa"); } } class B extends A{ private void show() { System.out.println("konichwa22"); } } /* Name of the class has to be "Main" only if the class is public. */ class test3 { public static void main (String[] args) throws java.lang.Exception { A a1= new B(); a1.show(); } }
I can't reproduce on 4.21 and 4.22 master, I see correct error "Cannot reduce the visibility of the inherited method from A". Please provide steps to reproduce & used Eclipse version, or explain what exactly should be a problem here.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.