定如下java代码, 编译运行之后, 将会输出( )
Public class Test {
Public static void main(String args[]){
Int a = 5;
System.out.println((a % 2 ==1)?(a+1)/2:a/2);
}
}
A.1 B.2 C.2.5 D.3正确答案D
定如下java代码, 编译运行之后, 将会输出( )
Public class Test {
Public static void main(String args[]){
Int a = 5;
System.out.println((a % 2 ==1)?(a+1)/2:a/2);
}
}
A.1 B.2 C.2.5 D.3正确答案D