题目内容

变量x、y和z的定义:int x=10,y=20,z=30; 则表达式 x> y ? (x> z ? x : y) : (y> z ? y : z) 的值是()。

A. 10
B. 20
C. 30
D. 表达式错误

查看答案
更多问题

下面程序运行输出的结果是()public class Test1 {public static void main(String[] args) {int x=4 ;System.out.println("value is "+(x>4?99.9:9));}}

A. value is 99.9
B. value is 9
C. value is 9.0
D. 99

下列程序标注的【代码1】,【代码2】的输出结果是什么?(答案格式:【代码1】:_____。【代码2】:_____。)public class E {public static void main(String args[]) {int [] a={10,20,30,40},b[]={{1,2},{4,5,6,7}};b[0] = a;b[0][1] = b[1][3];System.out.println(b[0][3]); //【代码1】System.out.println(a[1]); //【代码2】}}

下列程序标注的【代码1】,【代码2】的输出结果是什么?(答案格式:【代码1】:_____。【代码2】:_____。)public class E {public static void main (String args[ ]){long[] a = {1,2,3,4};long[] b = {100,200,300,400,500};b = a;System.out.println("数组b的长度:"+b.length); //【代码1】System.out.println("b[0]="+b[0]); //【代码2】}}

下列程序的输出结果是_____。public class E {public static void main (String args[ ]) {char x='你',y='e',z='吃';if(x>'A'){y='苹';z='果';}elsey='酸';z='甜';System.out.println(x+","+y+","+z);}}

答案查题题库