Hello all, Why don't interfaces support static final method declarations? I've been looking around, and I see plenty of explanations that just point to the JLS and say 'because'. Can anyone help me with why? Abstract classes support static method declarations. Interfaces support field declarations which are exposed as static final fields. Static final methods in interfaces could be bound at compile time (like any other static method) and the compiler could complain about ambigous references (like it does with final static fields). I'm not looking for a new JSR, but I searched and couldn't find an explanation. Any thoughts? Thanks, Chris
Debates about this have raged on the Internet since Java's earliest days. One page that summarizes the topic is http://zoom.z3950.org/bind/java/comment/static.html . Basically, there could be static methods in interfaces, but the only sensible meaning for them would involve actually writing the code in the interface, not in any implementing classes. Static methods are looked up at compile time, not run time; there's no notion of "overriding" static methods. If there were static methods in in interfaces, and they could be overridden by child classes, this would imply some fairly fundamental changes to the Java language and the JVM itself, and it's a little too late for that.