A. Java面向对象 B. Java虚拟机 C. Java垃圾回收机制 D. Java编译器
A. int num = add(1.0,2.0); B. int num = add(1,2); C. int num = add(true,flase); D. int num = add("1", "2");
A. break可用于跳出循环,当多层嵌套时,只用于跳出一层循环 B. break即可以出现在循环语句中也可以出现在switch语句中 C. continue可以用于跳出循环 D. continue不能出现在switch语句中
A. _avaj B. 5save C. Avaj D. $80
A. for (int j = arr.length - 1; j > i; j--) {if (arr[j] < arr[j - 1]) {int temp = arr[j];arr[j] = arr[j - 1];arr[j - 1] = temp;isSwap = true;}} B. for (int j = arr.length - 1; j > 0; j--) { if (arr[j] < arr[j - 1]) {int temp = arr[j];arr[j] = arr[j - 1];arr[j - 1] = temp;isSwap = true;}} C. for (int j = i + 1; j< arr.length; j++) { if (arr[j] < arr[j - 1]) {int temp = arr[j];arr[j] = arr[j - 1];arr[j - 1] = temp;isSwap = true;}} D. for (int j = i; j< arr.length; j++) { if (arr[j] < arr[j - 1]) {int temp = arr[j];arr[j] = arr[j - 1];arr[j - 1] = temp;isSwap = true;}}
A. if (count++ >= 10) { break; } B. if (++count >= 10) { break; } C. if (count++ >= 10) { continue; } D. if (++count >= 10) { continue; }
A. public class SomeThing B. private String str; C. public int addOne(final int x) D. return ++x;
A. int[] arr = new int[8]; B. int[] arr = new int[8]{}; C. int[] arr = {}; D. int[] arr = new int[]{};
A. p.setWeight(420); B. Payload.setWeight(420); C. p = new Payload(420); D. p = new Payload();p.setWeight(420);
A. short LONG B. SHORT LONG C. 编译失败 D. 抛出运行时异常