There is an interface1 having method1, variable x and interface2 having method1, variable x. Why does it shows up error in Line 1 and not in Line 2?
interface interface1{
public int x =10;
public void method1();
}
interface interface2{
public int x =11;
public void method1();
}
public class Test implements interface1, interface2{
int y = x; // Line 1
@Override
public void method1() { //Line 2
}
}