????interface A {
????default void say(int name) {
????}
????}
????interface B {
????default void say(String name) {
????}
????}
????interface C extends A??B{
????}
?????????е??????????????????????????????
????interface A {
????default void say(int a) {
????System.out.println("A");
????}
????}
????interface B {
????default void say(short a) {
????System.out.println("B");
????}
????}
????interface C extends A??B{
????}
????static class D implements C {
????}
????public static void main(String[] args) {
????D d = new D();
????byte a = 1;
????d.say(a); //B
????}
????Java?????????????? ??ο?Java?淶 15.12.2.5
???????????
???????濴??????е????? ??й????????? A2???A1?? C???A2??
????+---------------+
????|  Interface A1 |
????+--------+------+
????|
????|
????|
????+--------+------+
????|  Interface A2 |
????+-------+-------+
????|
????|
????|
????+-------+--------+
????|   Interface C  |
????+----------------+
????????????????????е?????? ?????????C????A2????????????????????????????? ????????????????????????A1????????????
????interface A {
????default void say(int a) {
????System.out.println("A");
????}
????default void run() {
????System.out.println("A.run");
????}
????}
????interface B extends A{
????default void say(int a) {
????System.out.println("B");
????}
????default void play() {
????System.out.println("B.play");
????}
????}
????interface C extends A??B{
????}
??????????
?????????????????????е?????? ????????????????
????+---------------+
????|  Interface A1 |
????+--------+------+
????|
????|
????|
????+--------+------+         +---------------+
????|  Interface A2 |         |  Interface B  |
????+-------+-------+         +---------+-----+
????|       +---------+---------^
????|       |
????|       |
????+-------+-------++
????|   Interface C  |
????+----------------+
???????A2??B???????????????????????????????? ????????????????????????????????????????????????????????????
????interface A1 {
????default void say(int a) {
????System.out.println("A1");
????}
????}
????interface A2 extends A1 {
????}
????interface B {
????default void say(int a) {
????System.out.println("B");
????}
????}
????interface C extends A2??B{
????default void say(int a) {
????B.super.say(a);
????}
????}
????????????????
????+--------------+
????| Interface A1 |
????+------+------++
????|      ^+-------+
????|               |
????+-------+-------+       |
????|  Interface A2 |       |
????+------------+--+       |
????^--++      |
????|      |
????+--+------+-----+
????|  Interface C  |
????+---------------+
???????A2???A1?? ???C???A2??A1?? ???????£?
????interface A1 {
????default void say() {
????System.out.println("A1");
????}
????}
????interface A2 extends A1 {
????default void say() {
????System.out.println("A2");
????}
????}
????interface C extends A2??A1{
????}
????static class D implements C {
????}
????public static void main(String[] args) {
????D d = new D();
????d.say();
????}
???????????????????????????A2??
??????????????C?????????????????? ???????A2??????????
????????
?????????й????????????? ?????????????????е?? ?????ж??е?????
????????????
??????????????????е??????????????????????????????
????+-------------+       +-----------+
????| Interface A |       |  Class B  |
????+-----------+-+       +-----+-----+
????^-+    +--+-----^
????|    |
????+---+----+-+
????|  Class C |
????+----------+
???????′????????????
????interface A {
????default void say() {
????System.out.println("A");
????}
????}
????static class B {
????public void say() {
????System.out.println("B");
????}
????}
????static class C extends B implements A{
????}
????public static void main(String[] args) {
????C c = new C();
????c.say(); //B
????}
??????????B??
????????????? ?????????и????????? ??????????????????????????н???????????
????????
????????????й???????????????й????
?????????????????? ????ó????μ?????
??????????????? ???????????е????????????????????? ????????и???????
???????????е????????????????е??????
??????????????????????? ????????????/???????????????????abstract??