[問題] 有關AssertionError一問?

看板java作者 (千里之外)時間14年前 (2011/08/28 19:41), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
public class test{ public static void main(String[] args){ assert a.length == 1; } } which two produce an AssertionError(choose two) A. java test B. java -ea test C. java test file1 D. java -ea test file1 E. java -ea test file1 file2 F. java -ea:test test file1 ans : B,E 我知道要加 -ea ,可以請教大家一下 DE的差別? 和F的正確用法嗎?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.168.4.234

08/28 19:51, , 1F
E --> args.length == 2 D --> args.length == 1
08/28 19:51, 1F

08/28 20:16, , 2F
謝謝..
08/28 20:16, 2F
文章代碼(AID): #1EMYc2WJ (java)