JAVA软件工程师笔试题(二十七)

时长:60分钟 总分:100分

221浏览 1人已完成答题

题型介绍
题型 单选题 简答题
数量 18 2
JAVA软件工程师笔试题(二十七)
1.
List接口的特点是哪项?
问题详情




2.
表示键值对概念的接口是哪项?
问题详情




3.
以下哪些集合接口支持重复元素存在?
问题详情




4.
以下哪些有关Vector类的描述是正确的?
问题详情




5.
下列哪些项是泛型的优点?
问题详情




6.
以下代码执行结果是? public class Example { public static void main(String[] args) { System.out.println(Math.min(Float.NaN, Float.POSITIVE_INFINITY)); } }
问题详情




7.
给出以下代码,请问在程序的第6行插入那条语句,改程序可依次打印输出11、10、9? 1.public class Example { 2. public static void main(String[] args) { 3. double x[] = { 10.2, 9.1, 8.7 }; 4. int i[] = new int[3]; 5. for (int a = 0; a < x.length; a++) { 6. 7. System.out.println(i[a]); 8. } 9. } 10.}
问题详情




8.
给出以下代码,为了结果输出-12.0,方法method(d)应为以下哪个方法? public class Example { public static void main(String[] args) { double d = -11.1; double d1 = method(d); System.out.println(d1); } }
问题详情




9.
以下代码的运行结果是什么? public class Example { public static void main(String[] args) { double d1 = -0.5; System.out.println("Ceil d1=" + Math.ceil(d1)); System.out.println("Floor d1=" + Math.floor(d1)); } }
问题详情




10.
以下代码的运行结果是什么? public class Example { public static void main(String[] args) { System.out.println(Math.min(0.0, -0.0)); } }
问题详情




11.
以下代码的输出结果是什么? public class Example { public static void main(String[] args) { System.out.println(Math.round(Float.MAX_VALUE)); } }
问题详情




12.
调用Math.random()方法最有可能输出以下哪些结果?
问题详情




13.
以下哪个方法用于计算平方根?
问题详情




14.
关于以下代码,说法正确的是? class Example{ public static void main(String[] args) throws IOException { if (args[0] == "hello") { throw new IOException(); } } }
问题详情




15.
请问以下哪些关于try…catch…finally结构中的finally语句的描述是正确的?
问题详情




16.
下面代码的执行结果是? class Example extends Utils { public static void main(String[] args) { try { System.out.print(new Example().getlnt("42")); } catch (Exception e) { System.out.println("Exc"); } } int getlnt(String arg) throws Exception { return Integer.parseInt(arg); } } class Utils { int getlnt() { return 42; } }
问题详情




17.
现有如下代码: public class Example { public static void main(String[] args) {// a new Example().topGo(); } void topGo() {// b middleGo(); } void middleGo() {// c go(); System.out.println("late middle"); } void go() {// d throw new Exception(); } } 为了使代码能够编译通过,需要在哪个地方加入声明throws Exception?
问题详情




18.
如下代码执行后的输出结果是? public class Example { public static void main(String[] args) { try { throw new Exception(); } catch (Exception e) { try { throw new Exception(); } catch (Exception e2) { System.out.println("inner"); } System.out.println("middle"); } System.out.println("out"); } }
问题详情




19.
窗口中JMenu的组织方式是什么?
问题详情
20.
何处理键盘事件?
问题详情