Java 8 ???????????
???????????? ???????[ 2015/5/22 15:42:41 ] ???????????????
????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??
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????