In the following code snippets, first one does not compile, but second one does . Why? What is the difference?
1.
public class test {
static interface I1 { I1 m(); }
static interface I2 { I2 m(); }
static interface I12 extends I1,I2 {
public I12 m();
}
}
2.
public class test {
static interface I1 { I1 m(); }
static interface I2 { I2 m(); }
static class I12 implements I1,I2 {
public I12 m(){
return null;
}
}
}