下面代碼的運(yùn)行結(jié)果是什么?()
A. 42 B. 0042 C. An exception is thrown at runtime. D. Compilation fails because of an error in line 13. E. Compilation fails because of an error in line 14.
int[] myArray = new int[] {1,2,3,4,5}; 以下哪個(gè)選項(xiàng)可以用一個(gè)數(shù)組創(chuàng)建一個(gè)列表?()
A. List myList = myArray.asList(); B. List myList = Arrays.asList(myArray); C. List myList = new ArrayList(myArray); D. List myList = Collections.fromArray(myArray);
Which is true?()
A. Line 3 will print the value 2. B. Line 3 will print the value 3. C. Compilation will fail because of an error in line 1. D. Compilation will fail because of an error in line 2.