单选题:假设有如下程序:
假设有如下程序:
```
public class Demo {
public static void main(String args[]) {
long num = 100 ;
int x = num + 2 ;
System.out.println(x) ;
}
}
```
最终程序的执行结果是什么?
A.102.0
B.1002.0
C.100.0
D.程序错误
答案:D
```
public class Demo {
public static void main(String args[]) {
long num = 100 ;
int x = num + 2 ;
System.out.println(x) ;
}
}
```
最终程序的执行结果是什么?
A.102.0
B.1002.0
C.100.0
D.程序错误
答案:D