2000-03-08 02:06:31 +08:00
|
|
|
interface I
|
|
|
|
{
|
2000-03-08 13:42:07 +08:00
|
|
|
int i = 1, ii = PR162.out ("ii", 2);
|
2000-03-08 02:06:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
interface J extends I
|
|
|
|
{
|
2000-03-08 13:42:07 +08:00
|
|
|
int j = PR162.out ("j", 3), jj = PR162.out ("jj", 4);
|
2000-03-08 02:06:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
interface K extends J
|
|
|
|
{
|
2000-03-08 13:42:07 +08:00
|
|
|
int k = PR162.out ("k", 5);
|
2000-03-08 02:06:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public class PR162
|
|
|
|
{
|
|
|
|
public static void main (String[] args)
|
|
|
|
{
|
|
|
|
System.out.println (J.i);
|
|
|
|
System.out.println (K.j);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static int out (String s, int i)
|
|
|
|
{
|
|
|
|
System.out.println (s + "=" + i);
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|