填空题多线程是Java语言的{{U}} 【6】 {{/U}}机制,只能够处理同步共享数据和各种不同的事件。
填空题将下面程序补充完整。 public class PowerCale public static void main(String[] args) double x=5.0; System.out.println(x+"to the power 4 is"+power(x,4)); System.out.println("7.5 to the power 5 is"+power(7.5,5)); System.out.println("7.5 to the power 0 is"+power(7.5,0)); System.out.println("10 to the power -2 is"+power(10,-2)); static double ______ (double x,int n) if(n>1)return x * power(x,n-1); else if(n<0)return 1.0/power(x,-n); else return n==0? 1.0:x:
填空题Java 源程序文件编译后产生的文件称为字节代码文件,其扩展名为 【8】 。
填空题请完善程序(程序文件名:Java_2.java)并进行调试。请在下画线处填入正确内容,然后删除下画线。请勿删除注释行和其他已有的语句内容。 [题目要求] 构造一个5行5列的二维数组,给数组赋值,并将其按照行列对齐的方式输出,使程序输出结果如下: 0 0 0 0 1 0 0 0 2 3 0 0 4 5 6 0 7 8 9 10 11 12 13 14 15 源程序: import java.io.*; public class Java_2 public static void main(String args[]) int a[][] =new int[5][5]; int i,j,k=1; for(i=0;i<5;i++) for(j=0; (1) ;j++) if((i+j)<4)a[i][j]=0; else (2) ; for(i=0;i<5;i++) for(j=0;j<5;j++) if(a[i][j]<10)System.out.print(a [i][j]+" "); else System.out.print(a[i][J]+" "); System.out.println();
填空题有以下程序: main() int n=0,m=1,x=2; if(!n) x+=1; if(m) x+=2; if(x) x+=3; printf("%d/n",x); 执行后输出的结果是______。
填空题为了使模块尽可能独立,要求模块的内聚程度要尽量高,且各模块间的耦合程度要尽量 【3】 。
填空题结构化程序设计的一种基本方法是______法。
填空题数据管理技术发展过程经过人工管理、文件系统和数据库系统三个阶段,其中数据独立性最高的阶段是{{U}} 【4】 {{/U}}。
填空题异常类在Java程序中是一种比较特殊的类,在使用之前必须先定义,按异常处理不同可分为运行异常、捕获异常、声明异常和______。
填空题以下程序运行后输出的结果是______。 void main() int x=15; while(x>10&&x<50) x++; if(x/3) x++;break; else continue, printf("%d/n",x);
填空题请阅读下列程序代码,然后将程序的执行结果补充完整。 程序代码: public class throwsExcepfion static void Proc(int se1) throws ArithmeticException,ArraylndexOutOfBoundsException System.out.println("in Situation"+se1); if(se1==0) System.out.println("no Exception caught"); return; else if(se1==1) int iArray[]=new int[4]; iArray [1]=3; public static void main(String args[])[ try Proc(0); Proc(1); catch(ArraylndexOutOfBoundsException e) System.out.println("Catch"+e); finally System.out.println("in Proc finally"); 执行结果: In Situation() no ExcepbOn cauSht 【14】 in Proc findly
填空题关于文件名的处理,测试当前文件是否是文件(不是目录)用函数boolean isFile(),测试当前文件是否是目录用函数______。
填空题Java语言中提供了 【8】 来管理组件在容器中的布局。
填空题设有数组定义:int a[ ]= { 1l,22,33,44,55,66,77,88,99};则执行下列几 个语句后的输出结果是{{U}} 【8】 {{/U}}。
for( int i= 0 ;i < a.length ;i + + )
if ( a[i]%3= =0 ) System.out.println(a[i] + " ");
填空题请写出下面程序的运行结果:
public class Test extends TT{
public static void main(String args[]){
Test t=new Test("Tom.");
}
public Test(String s){
super(s);
System.out.print("How are you?");
}
public Test(){
this("I am Jack.");
}
}
class TT{
public TT(){
System.out.print("Hi!");
}
public TT(String s){
this();
System.out.print("I am"+s);
}
}
结果:{{U}} 【15】 {{/U}}。
填空题Java的swing包中定义了两种构件:轻量级构件和{{U}} 【11】 {{/U}}。
填空题Applet工作在图形方式下,向其中绘图、显示动画等都需要使用方法 【13】 。
填空题Java通过过滤流对I/O访问提供{{U}} 【10】 {{/U}}机制。
填空题安装完JDK后,还需设置path和 【11】 变量。
填空题Java运行时,系统通过______周期性地释放无用对象所使用的内存空间,以完成对象的消除。