9.假设有如下程序: public class Demo { public static void main(String args[]) { String str = "" ; for (int x = 0 ; x < 5 ; x ++) { str += x ; } System.out.println(str) ; } } 最终的执行结果是什么?
A. 01234
B. 10
C. 14
D. 25
相关知识点: https://edu.aliyun.com/course/34
正确答案:A
10.假设有如下程序:
public class Demo {
public static void main(String args[]) {
int num = 2147483647 ;
long temp = num + 2L ;
System.out.println(temp) ;
} }
最终的执行结果是什么?
A. -2147483648
B. 2147483649
C. 2147483647
D. 2
相关知识点: https://edu.aliyun.com/course/34
正确答案:B