Query abt interface variable
Code:
interface i1{
void add();
int i = 5;// by default this variable is public static final
}
interface i2 extends i1 {
void add();
int i = 10; // by default this variable is public static final
}
class C implements i2{
public void add(){
System.out.println(i);
}
}
I ran the above code , it was compiling ...
my query is , what abt the variable i and Fn add() ? will it get updated ?
or two two add() and variable i will present in memory?
Thanks in advance...
Gobi.S
Have a happy weekend :o: