更多“若x=6 ,y=5 则表达式int max=x>y?x:y 的结果为()”相关的问题
第1题
若有定义:int x=5,y=3;则表达式(x>2 && y>2)的值为1。
点击查看答案
第2题
int x,y; if(x<2) y="x;" else 若x="8,则y的值为()<br"> A、8
点击查看答案
第3题
[图]A、y=-9x-6或y=-x+2B、y=-9x-6或y=-x-2C、y=-9x-6D、y...
A、y=-9x-6或y=-x+2
B、y=-9x-6或y=-x-2
C、y=-9x-6
D、y=-x-2
点击查看答案
第4题
boolean b=true; if(b=false) { System.out.println("a"); } else if(b) { System.out.println(b); } else if(!b) { System.out.println("c"); } else { System.out.println("d"); } 程序的执行结果是( )
点击查看答案
第5题
阅读下面程序片段 switch (i) { case 1: System.out.println("message1"); case 2: System.out.println("message2"); case 3: System.out.println("message3"); break; } 请选择当变量i的值为多少时,程序只输出“message 3”
点击查看答案
第6题
请阅读下面的程序片段 int x = 1, y = 1; if (x++ == 2 & ++y == 2) { x = 7; } System.out.println("x=" + x + " , y=" + y); 程序的运行结果是( )
A、x=1,y=1
B、x=7,y=1
C、x=7,y=2
D、x=2,y=2
点击查看答案
第7题
请阅读下面的代码 boolean a = false; boolean b = true; boolean c= ( a&&b)&&(!b); int result = (c = = false)?1:2; 当语句执行完,变量c与result的值为( )
A、false和1
B、false和2
C、true和1
D、true和2
点击查看答案
第8题
请阅读下面的程序 public class Example03 { public static void main(String[] args) { int x = 8; if (x > 5) { System.out.println("a"); } else { System.out.println("b"); } } } 程序的运行结果是?()
点击查看答案
第9题
请先阅读下面的代码。 int x = 1; int y = 2; if (x % 2 == 0) { y++; } else { y--; } System.out.println("y=" + y); 上面一段程序运行结束时,变量y的值为下列哪一项
点击查看答案