public interface B { String iname = "TBA"; int iid = 0; public static void main(String[] args) { System.out.println("Hello"); } public static void goForIt() { System.out.println("Went for it"); } public void doSomething(); } And now...
public class D { public static void main(String[] args) { B.goForIt(); } } This successfully printed "Went for it". I was told that interfaces cannot have static methods though. So, what's going on here? However, when I have a class implement B, then the static method doesn't work.