問題詳情

三、有下列 JAVA 程式片段,請寫出執行結果。(20 分)String s4 = new String(“restful”) ;String s5 = new String(“restful”) ;String s6 = new String(“peaceful”) ;String s7 = s4 ;String s8 = “restful” ;String s9 = “restful” ;System.out.println(s4.equals(s5)) ;System.out.println(s4.equals(s6)) ;System.out.println(s4 == s5) ;System.out.println(s4 == s7) ;System.out.println(s4 == s8) ;System.out.println(s8 == s9) ;

參考答案

答案:C
難度:適中0.575688
統計:A(113),B(6),C(251),D(24),E(0)

內容推薦

內容推薦