更多"已知:Manager extends Employee观察:publi"的相关试题:
[单项选择]public class Test
public static void main(String args[])
int a=2,b=4,c=6
Strint s="abc";
System.out.print (a/b+s+c);
A. "absac"
B. "242466"
C. "6abc6"
D. "24abc6"
[单项选择]阅读下列程序: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. 上述选项都不正确
[单项选择]
已知有下面过程: Private Sub proc1(a As Integer,b As String,Optional x As Boolean) ...... End Sub 正确调用此过程的语句是()。
A. Call procl(5)
B. Call procl 5,"abc",False
C. procl(12,"abc",Tru
D. procl 5,"abc"
[单项选择]已知如下代码:
public class Test
public static void main (String arg[])
longa[]=new long[10];
System.out.Println(a[6]);
下列选项正确的是( )。
A. 输出为null
B. 输出为0
C. 编译时出错
D. 运行时出错
[单项选择]已知如下代码: public class Test{ public static void main (String arg[]){ longa[]=new long[10]; System.out.Println(a[6]); } } 下列选项正确的是( )。
A. 输出为null
B. 输出为0
C. 编译时出错
D. 运行时出错
[单项选择]The manager showed the new employee ________to find the supplies.
A. what
B. where
C. that
D. which
[单项选择]对下列程序的叙述中,正确的是 1:public class X extends Thread implements Runnable{ 2:publ主c void run(){ 3: System.out.println(“this is run()”); 4:} 5:public static void main(String args〔〕){ 6:Threadt二new Thread(new X()); 7:t.start(); 8:} 9:}
A. 第1行会产生编译错误
B. 第6行会产生编译错误
C. 第6行会产生运行错误
D. 程序正常运行
[单项选择]已知类MyClass声明如下: class MyClass{ int U; public: MyClass(int k):n(k){ } int getValue( )const{return n;} }; 在下列数组定义中正确的是
A. MyClass xl[2];
B. MyClass x2[2]={new MyClass(1),new MyClass(2)};
C. MyClass*x3[2];
D. MyClass*x4[2]={MyClass(1),MyClass(2)};
[单项选择]已知有下面的类说明: public class Test4 { private float f=1.0f; int m=12; static int n=1; public static void main(String args[]) { Test4 e=new Test4( ); } } 在main( )方法中,下面哪个的使用是正确的 ( )
A. f
B. thin
C. Test4.m
D. Test4.f
[单项选择]已知如下代码: public class Test long a[]=new long[10] public static void main (String args[]{ System.out.println(a[6];} 以下( )语句是正确的。
A. Output is nul
B. When running,some error will occu
C. When compile,some error will occu
D. Output is 0.
[单项选择]已知有下列类的说明,则下列哪个语句是正确的
public class Test{
private float f = 1.0f;
int m = 12;
static int n=1;
public static void main(String arg[ ]){
Test t = new Test( );
}
}
A. t.f;
B. this.n;
C. Test.m;
D. Test.f;