Skip to main content
edited tags
Link
skaffman
  • 404.6k
  • 96
  • 825
  • 775
edited tags
Link
IAdapter
  • 65.6k
  • 73
  • 188
  • 243
Source Link
Henrik Paul
  • 68k
  • 32
  • 87
  • 96

Why can't I declare static methods in an interface?

The topic says the most of it - what is the reason for the fact that static methods can't be declared in an interface?

public interface ITest { public static String test(); } 

The code above gives me the following error (in Eclipse, at least): "Illegal modifier for the interface method ITest.test(); only public & abstract are permitted".