-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b08
-
Verified
If this program is compiled:
class Super {
static void m() {}
}
class Sub extends Super {
private static void m() {}
}
you obtain this error message:
Test2.java:6: error: m() in Sub cannot override m() in Super
private static void m() {}
^
attempting to assign weaker access privileges; was <----- was what?
1 error
if the static modifier is removed in both methods then the error message specify that the access was "package"
class Super {
static void m() {}
}
class Sub extends Super {
private static void m() {}
}
you obtain this error message:
Test2.java:6: error: m() in Sub cannot override m() in Super
private static void m() {}
^
attempting to assign weaker access privileges; was <----- was what?
1 error
if the static modifier is removed in both methods then the error message specify that the access was "package"