Static attributes in interfaces forbidden from having initialisers
Closed this issue · 4 comments
FroMage commented
I'm pretty sure this is a limitation that only makes sense when non-static, no? @gavinking ?
ATM I get: statement or initializer may not occur directly in interface body
for:
interface StaticInterfaceMethods {
static Integer attr = 2;
}
gavinking commented
Um, I'm not 100% sure. Can interfaces have static fields in Java now?
FroMage commented
They always could ;)
FroMage commented
Thanks!