Meaning of “Cannot reduce the visibility of the inherited method” with an interface

In a Java interface each method is by default public:

Every method declaration in the body of an interface is implicitly abstract, so its body is always represented by a semicolon, not a block.

Every method declaration in the body of an interface is implicitly public. [..]

In an implementing class you are not allowed to reduce the visibility, and by not specifying an access modifier:

void print(){..}

you are specifying the access level default, which has lower visibility than public.

Leave a Comment