下列语句片段的结果是?int result;int a=17;int b=6;result=(a%b>4)?a%b:a/b;System.out.print(result);
A. 0
B. 1
C. 2
D. 5
以下程序的运行结果是?public class Conditional {public static void main(String[] args) {int x = 4;System.out.print("Value is " + ((x > 4) ? 99.99 : 9));}}
A. 输出:Value is 99.99
B. 输出:Value is 9
C. 输出:Value is 9.0
D. 第4行出现编译错误
下列程序执行的结果是?int x = 1,y = 1;if(x++==2 & ++y==2){x =7;}System.out.println("x="+x+",y="+y);
A. x=2,y=2
B. x=1,y=2
C. x=2,y=1
D. x=1,y=1
下列程序运行的结果是?int x = 1,y = 1;if(x++==1 | ++y==1){x =7;}System.out.println("x="+x+",y="+y);
A. x=7,y=2
B. x=2,y=7
C. x=7,y=7
D. x=2,y=2