关注蜜蜂引路,注册平台账号.
下列不属于Swing的构件是 【 】。
A、JButton
B、JLabel
C、JFrame
D、JPane
D
【解析】
Swing构件中JButton是按钮构件,JLabel为标签构件,JFrame为顶层窗体容器构件。
中间容器面板应为JPanel,而不是JPane。
Swing组件的父类是javax.swing.____________,该类是一个抽象类。
Swing中用来表示表格的类是javax.swing.__________。
Swing 中的按钮类是javax.swing.__________。
Swing与AWT相比新增的布局管理器是【 】。
在对象流中,对象的传送首先要将所传送的对象串行化,也就是实现Serializable接口。以下代码中必须要实现Serializable接口的类是__________。ObjectInput in=new ObjectInputStream(new FileInputStream("employee. dat"));Employee[] newStaff=(Employee[])in. readObject();
Java中的抽象类Reader和Writer所处理的流是【 】。
在Java中,“目录”被看作是【 】
在Java 中,对象流以____________方法传送和存储。
Java 输入/输出流中包括字节流、____________、文件流、对象流以及管道流。
下列程序的运行结果是 【 】public class test{ private String[] data={“10”,“10.5”}; public void fun(){ double s=0; for(int i=0;i<3;i++){ try{ s=s+Integer.parseInt(data[i]); }catch(Exception e){ System.out.print(“errorl:”+data[i]); } } } public static void main(String[] args){ try{ testd=new test(); d.fun(); }catch(Exception e){ System.out.printIn(“error2”); } } }
下列不属于Swing中构件的是【 】
类Panel默认的布局管理器是【 】
Swing中的组件往往采用MVC结构,MVC指的是 Model、View和____________。
构件不能独立地显示出来,必须将构件放在一定的____________中才能显示。
能将显示空间分成很多层的布局管理器是__________。
AWT中用来表示颜色的类是【 】。
下列代码的执行结果是 【 】public class Test { public static void main(String[] args){ int[] x={0,1,2,3}; for(int i=0;i<3;i+=2){ try{ System.out.println(x[i+2]/x[i]+x[i+1]); }catch(ArithmeticException e){ System.out.println("error1"); }catch(Exception e){ System.out.println("error2"); } } } }
在oneMethod()方法运行正常的情况下,程序段将输出什么? public void test(){ try{ oneMethod(); System.out.println("condition 1"); }catch(ArrayIndexOutOfBoundsException e){ System.out.println("condition 2"); }catch(Exception e){ System.out.println("condition 3"); }finally{ System.out.println("finally"); } }
下列常见的系统定义的异常中,哪个是输入/输出异常【 】
下列叙述中,错误的是【 】
接口中,除了抽象方法之外,还可以含有【 】
下列关于内部类的说法不正确的是【 】
下列关于继承的哪项叙述是正确的【 】
下列描述中,正确的是【 】
java.io包的File类是【 】
在程序读入字符文件时,能够以该文件作为直接参数的类是【 】