相关题目
继承是面向对象编程的一个重要特征,它可降低程序的复杂性并使代码:
在Java中,若要使用一个包中的类时,首先要求对该包进行导入,其关键字是:
阅读下列代码
public class Person{
static int arr[ ] = new int[10];
public static void main (String[] args) {
System.out.println(arr[9]);
}
}
该代码运行的结果是:
阅读下列利用递归来求n!的程序:
class FactorialTest{
static long Factorial (int n) { //定义Factorial ()方法
if (n==1)
return 1;
else
return n* Factorial(_____);
}
public static void main (String a[]) { // main ()方法
int n=8;
system.out.println{n+"! = "+Factorial (n)};
}
}
为保证程序正确运行,在下划线处应该填入的参数是:
下列运算中属于跳转语句的是:
下列运算符中,优先级最高的是:
AWT中用来表示颜色的类是:
对鼠标点击按钮操作进行事件处理的接口是:
下列不属于Swing的构件是:
阅读下列程序
public class VariableUse{
public static void main (String[] args) {
int a;
if (a==8) {
int b=9;
System.out.println("a = "+a);
System.out.println("b = "+b);
}
System.out.println("a = "+a);
System.out.println("b = "+b);
}
}
该程序在编译时的结果是:
