1) Both constants have the same meaning. By default, fields declared in an interface are public static final .
2) Fields in the interface should not be preferred. (until you are sure that the other interface will not have a field with the same name).
interface A { String X = "XYZ"; } interface B { String X = "ABC"; } class C implements A, B { public static void main(String[] args) { System.out.println(X);
3) Efficiency does not depend on where you place the constant; in class or in interface.
source share