下列变量的定义中,错误的是()
第1题:
A.floatf=11.1;
B.doubled=5.3E12;
C.charc=’\r’;
D.Booleanb=true;
第2题:
publicclassTest{publicstaticvoidmain(String[]args){intx=5;booleanb1=true;booleanb2=false;if((x==4)&&!b2)System.out.print(”l);System.out.print(”2);if((b2=true)&&b1)System.out.print(”3);}}Whatistheresult?()
A.2
B.3
C.12
D.23
E.123
F.Compilationfails.
G.Auexceptionalisthrownatruntime.
第3题:
A.Theprogramrunsandprintsnothing.
B.Theprogramrunsandprints“Equal”
C.Anerroratline5causescompilationtofail.
D.Theprogramrunsbutabortswithanexception.
第4题:
A.Theprogramrunsandprintsnothing.
B.Theprogramrunsandprints“Equal”
C.Anerroratline5causescompilationtofail.
D.Theprogramrunsbutabortswithanexception.
第5题:
下列代码的执行结果是()。publicclasstest5{publicstaticvoidmain(Stringargs[]){Strings1=newString("hello");Strings2=newString("hello");System.out.prim(s1==s2);System.out.print(",");System.out.println(s1.equals(s2));}
A.true,false
B.true,true
C.false,true
D.false,false
第6题:
A、intc=10;//定义变量c
B、*/intc=5;intx=6;*/
C、/**这是类的入口方法*/
D、/*/*intc=10;*/intx=5;*/
第7题:
在java中,下列()语句不能通过编译。
第8题:
已定义下列变量:intn;floatf;doubledf;df=10;n=2;下列语句正确的是()
第9题:
下列语句定义pf为指向float类型变量f的指针,()是正确的。
第10题:
f=df
f=12.3
n=df
df=n=100
第11题:
setText(Strings)
getText()
TextArea(Strings)
TextArea(intx,inty)
第12题:
Fun(intx,inty=0)
Fun(intx=100)
Fun(intx=0,inty)
Fun(intx=f())(假定函数f()已经定义)
第13题:
A.protectedvoidchange(intx){}
B.publicvoidchange(intx,inty){}
C.publicvoidchange(Strings){}
D.publicvoidchange(intx){}
第14题:
A.Theprogramrunsandprints“Hello”
B.Anerrorcausescompilationtofail.
C.Theprogramrunsandprints“Helloworld!”
D.Theprogramrunsbutabortswithanexception.
第15题:
A.Theprogramrunsandprints“Hello”
B.Anerrorcausescompilationtofail.
C.Theprogramrunsandprints“Helloworld!”
D.Theprogramrunsbutabortswithanexception.
第16题:
在VBA中,如果没有显式声明或用符号来定义变量的数据类型,变量的默认数据类型为
A.Boolean
B.Int
C.String
D.Variant
第17题:
下列变量的定义中,错误的是( )。
A.int X=3;
B.float f;d;
C.String s="Hell0";
D.boolean b=true;
第18题:
用于文本*区中设置文本同时清除文本*区中原有文本的方法是()
第19题:
VBA中如果没有显式声明或未用符号来定义变量的数据类型,则变量的默认数据类型为()
第20题:
已知:intm=10;下列表示引用的方法中,正确的是()
第21题:
下列函数参数默认值定义错误的是()。
第22题:
intx=8;
floatf;d;
Strings=hello;
booleanb=true;
第23题:
int x=3;
float f;d;
String S=“Hello!”;
boolean b=true;