阿摩線上測驗 登入

申論題資訊

試卷:96年 - 96 關務特種考試_四等_資訊處理:程式語言概要#39368
科目:程式語言
年份:96年
排序:0

申論題內容

三、有下列 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) ;