填空题在自定义Swing构件的时候,首先要确定使用哪种构件类作为所定制构件的 【7】 ,建议继承JPanel类或更具体的Swing构件类。
填空题加载Applet时,发生的操作是:产生1个Applet类的 【14】 ,然后对Applet进行初始化,最后启动Applet。
填空题Java源程序是由类定义组成的,每个程序中可以定义若干个类,但是只有一个类是主类,在JavaApplication程序中,这个主类是指包含______方法的类,在JavaApplct里,这个主类是一个系统类______的子类。
填空题Java语言的异常处理机制利用 【11】 语句作为异常处理的统一接口。
填空题实体联系模型是一种常用的高级上 【4】 模型,而 【5】 是实体联系模型中的核心。
填空题Java中的异常对象是Error类或Exception类的对象,这两类对象中______类的对象不会被Java应用程序捕获和抛出。
填空题{{U}}【11】 {{/U}}技术用在数字传输技术领域,以传输的可靠性为目的,进行差错控制。
填空题若想在程序中使用JLabel类,则该程序可以使用import{{U}} 【6】 {{/U}}JLabel;语句引入 JLabel类。
填空题本题中,用表格表现某个月的月历,其中标题是从Sunday到Saturday,表格中的各项是可以修改的。 import java. awt. * ; import java. awt. event. * ; import javax. swing. * ; import javax. swing. table. * ; public class java2 public static void main(String[] args) try UIManager. setLookAndFeel(UIManager, getSystemLookAndFeelClassName()); catch (Exception e) JFrame frame=new CalendarTableFrame(); frame. setDefaultCloseOperation ( JFrame. EXIT_ON_CLOSE); frame. show(); class CalendarTableFrame extends JFrame private static final int WIDTH=500; private static final int HEIGHT=150; private______cells= null, null, null, new Integer(i), new Integer(2), new Integer(3), new Integer(4), new Integer(5), new Integer(6), new Integer(7), new Integer(8), new Integer(9), new Integer(10), new Integer(11), new Integer(12), new Integer(13), new Integer(14), new Integer(15), new Integer(16), new Integer(17), new Integer(18), new Integer(19), new Integer(20), new Integer(21), new Integer(22), new Integer(23), new Integer(24), new Integer(25), new Integer(26), new Integer(27), new Integer(28), new Integer(29), new Integer(30), new Integer(31), null private String[] columnNames= "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" public CalendarTableFrame() setTitle("java2"); setSize(WIDTH, HEIGHT) JTable table=new______; getContentPane(). add(new JScrollPane(table), BorderLayout. CENTER);
填空题请阅读下列程序代码,然后将程序的执行结果补充完整。
程序代码:
public class throwsException{
static void Proc(int sel)
throws ArithmeticException, ArrayIndexOutOfBoundsException
System.out.println("In Situation"+sel);
if(sel==0){
System.out.println("no Exception caught");
return;
}
else if(sel==1){
int iArray[]=new int[4];
iArray[1]=3;
}
}
public static void main(String args[]){
try{
Proc(0);
Proc(1);
}
catch (ArrayIndexOutOfBoundsException e){
System.out.println("Catch"+e);
}
finally{
System.out.println("in Proc finally");
}
}
}
执行结果
In Situation 0
no Exception caught
{{U}} 【14】 {{/U}}
in Proc finally
填空题若a是float型变量,且a=6,则表达式a/2+(int)(a+1)%2的值为{{U}} 【6】 {{/U}}。
填空题可以通过 【10】 语句来捕获所有的异常。
填空题有如下代。码片段,请填写完整相应的代码。 public class JavaProg extends java.applet,Applet public void init() // 将 applet 初始化 Public void start() 【15】 ; public void stop() // 停止 Applet public void destory() // 销毁 Applet
填空题请将程序补充完整。 1. 【9】 classC 2. 3. abstract viod callme(); 4. void metoo() 5. 6. System. out. println(“类C的metoo()方法”); 7. 8. 9.Class D 【10】 C 10. 11. void callme() 12. 13. System.out.println(“重载C类的callme()方法”); 14. 15. 16.public class Abstract 17. 18. public static void main(String args[]) 19. 20. Cc= 【11】 D(); 21. c.callme(); 22. c.metoo(); 23. 24.
填空题______ 类是由编译器自动生成对象的一个特殊类,它伴随每个类。
填空题下列软件系统结构图的宽度为______。
填空题变量名、______首单词小写,其余单词只有首字母大写。
填空题下面程序执行的结果应是 【8】 。 class Test2 public static void main(String [] args) int i=2,j=1; byte k=(byte)(i+j); System.out.println(k);
填空题数据库系统中实现各种数据管理功能的核心软件称为上{{U}} 【2】 {{/U}}。
填空题捕获异常的统一出口通过______从句,因此对catch而言,无论由哪个捕获异常,最后一定去执行该语句。
