使用当前浏览器访问考试宝,无法享受最佳体验,推荐使用 Chrome 浏览器进行访问。
更新时间: 试题数量: 购买人数: 提供作者:
有效期: 个月
章节介绍: 共有个章节
我的错题 (0道)
我的收藏 (0道)
我的斩题 (0道)
我的笔记 (0道)
顺序练习 0 / 0
随机练习 自定义设置练习量
题型乱序 按导入顺序练习
模拟考试 仿真模拟
题型练习 按题型分类练习
易错题 精选高频易错题
学习资料 考试学习相关信息
有以下方法的定义,请选择该方法的返回类型( )。
下面的方法,当输入为2的时候返回值是多少?( )
public static void main(String[] args) {int x=1,a=0,b=0;switch(x){case 0:b++;case 1:a++;case 2:a++; b++;}System.out.println("a="+a+",b="+b); }
在Java中,以下程序段的输出结果是 ()。
(含图)
在Java中,下列程序的运行结果是( )。
public class Demo {public static void main(String args[]) {boolean flag = 10%2 == 1 && 10 / 3 == 0 && 1 / 0 == 0 ;System.out.println(flag ? "mldn" : "yootk") ;}}
public class Demo {public static void main(String args[]) {char c = 'A' ;int num = 10 ;switch(c) {case 'B' : num ++ ;case 'A' : num ++ ;case 'Y' : num ++ ; break ;default : num -- ;}System.out.println(num) ;}
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner input = new Scanner(System.in);int m = input.nextInt();switch(m) {case 0: System.out.println("case 0");case 1: System.out.println("case 1");break;case 2:default:System.out.println("default");}}}
public class Main {public static void main(String[] args) {int x = 4;System.out.println("value is "+((x>4)?99.9:9));}}
double temperature = 50;if (temperature >= 100)System.out.println("too hot");else if (temperature <= 40)System.out.println("too cold");else System.out.println("just right");
代码段 2:even = (number % 2 == 0) ? true: false;
代码段 3:even = number % 2 == 0;