|
Relates :
|
This program:
// --
interface IfaceWithPrivateFinalMethod {
private final void privateFinalMethod() {}
}
triggers the error:
X.java:2: error: modifier final not allowed here
private final void privateFinalMethod() {}
^
1 error
It would seem since private methods are not inherited, they are final anyway and the compiler should allow the combination of private and final to modify an interface method.
|