T
Thomas Hawtin
Why member interface is always static?
Interfaces have no variables. Therefore they cannot have an outer this.
Tom Hawtin
Why member interface is always static?
Interfaces have no variables. Therefore they cannot have an outer this.
Roedy said:How did you interpret his question? You can't apply the word static
to an interface. Was he asking why all the members in an interface are
static finals?
v4vijayakumar said:public class test {
static interface vijay {
}
public static void main(java.lang.String [] args) {
}
}
[root@cp_node1 (StkBarolo) java]#javap test$vijay
Compiled from test.java
public class test extends java.lang.Object {
public test();
public static void main(java.lang.String[]);
static interface test. vijay
/* ACC_SUPER bit NOT set */
{
}
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.