Java program for accessing interface attributes

 interface A

{

int i = 10;

}

class B implements A

{

static int j=20;

}

class Demo 

{

public static void main(String ar[])

{

System.out.println(B.i);

System.out.println(B.j);

}



OUTPUT




Comments