If we execute run the following code, the output is 10.
interface X{
int abc = 0;
}
interface XX extends X{
int abc = 10;
}
class XTest implements XX
{
public static void main(String[] args)
{
System.out.println("Hello World! --> " +abc);
}
}
But as per Java, interface variables are public static final. but how am I getting 10 as output?