更多"已知有下列类的说明,则下列哪个语句是正确的
public c"的相关试题:
[单项选择]已知有下列类的说明,则下列哪个语句是正确的
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;
[单项选择]已知有下列类的说明,则下列哪个语句是正确的
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. f;
B. this. n
C. Test.m;
D. Test.f;
[单项选择]已知有下列类的说明,则下列哪个语句是正确的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. f;
B. thi n
C. Tesm;
D. Tesf;
[单项选择]已知如下代码:
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 args[])
int a=-67,b=116,c=78;
int e=~c>>2&(a|~B) ;
System.out.println(e);
A. 70
B. -84
C. 65
D. -80
[单项选择]已知如下代码: 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 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
public static void main(StringArgsl[])
String s1=new String("How");
String s2=new String("How");
System.out.println(!(s1==s2));
A. false
B. true
C. 1
D. 0