更多"对下列程序的叙述中,正确的是 1:public class X ex"的相关试题:
[单项选择]阅读下列程序:class ThreadTest extends Thread{ public static void main(String[]args){ Thread t=new Thread(this); t.start( ); } public void run( ){ System.out.print("A thread test."); }} 对该程序而言,正确结论是 ( )
A. 该程序能够通过编译并打印输出“A thread tes”
B. 该程序能够通过编译,但运行时将不调用ThreadTest类中的run()方法,因此不产生任何输出
C. 该程序存在编译错误,因为在main()方法中不能使用this指针
D. 上述选项都不正确
[单项选择]已知:Manager extends Employee观察:public Manager(String n,double s,int year,int month,int day) { super(n,s,year,month,day); bonus=0; }其中super是 ( )
A. Object类
B. Manager类
C. Employee类
D. Class类
[单项选择]给出下列的程序,其叙述正确的是 public class Man { static int arr[ ] = new int[10]; public static void main(String a[ ] ) { System.out.println(arr[1] ); } }
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]给出下列的程序,其叙述正确的是 ( )
public class Man
static int arr[]=new int[10];
public static void mam(String a[])
System.out.println(arr[1]);
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]给出下列的程序,其叙述正确的是 ( ) public class Man { static int arr[]=new int[10]; public static void mam(String a[]) { System.out.println(arr[1]); { }
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]给出下列的程序,其叙述正确的是( )。
public class Man {
static int arr[ ] = new int[10];
public static void main(String a[ ] ) {
System.out.println(arr[1] );
}
}
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]给出下列的程序,其叙述正确的是public class Man { static int arr[]= new int [10]; public static void main (String a []){ System.out.println(arr[1]); }}
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null