If we run the following code, the output will be 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 according to Java, interface variables are publicly available. but how do I get 10 as output?
user421147
source share