色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

Java中接口為什么可以調用toString方法,接口中根本就沒有toString方法?

傅智翔2年前13瀏覽0評論
importstaticmy.MyCode.*;importjava.util.*;importmy.*;interfaceA{,publicvoidf();}classBimplementsA{,publicvoidf(){},publicvoidg(){},publicStringtoString(){,return"mynameisB";,}}classTest{,publicstaticvoidprintln(Objects){,System.out.println(s);,},protectedvoidf(){,println("Test");,},publicstaticvoidmain(String[]args){,Aa=newB();,println(a.toString());//編譯成功,//a.g();//編譯error,}}