I have two files:
public interface PrintService { void print(PrintDetails details); class PrintDetails { private String printTemplate; } public interface Task { String ACTION = "print"; } }
and
public class A implements PrintService { void print(PrintDetails details) { System.out.println("printing: " + details); } String action = PrintService.Task.ACTION; }
I thought the code looked fine, but I get an error in the second file for the line void print(PrintDetails details) {
, which reads:
It is not possible to reduce the visibility of an inherited method from PrintService
.
Can someone explain what this means to me?
Alan2 source share