true
false
1
0
hello
第1题:
给出下面的代码,则以下( )选项返回true。 String s="hello"; String t="hello"; Char c[]={'h','e','l','l','o'};
A.s. equals (t) ;
B.t. equals (C);
C.s==t;
D.t==c;
第2题:
A.true
B.false
C.1
D.0
第3题:
关于函数返回值类型和返回值表达式的类型的描述中,错误的是( )。
A.函数返回值类型决定了返回值表达式的类型
B.函数返回值的类型是在定义函数时确定的,在函数调用时不能改变
C.函数返回值的类型就是返回值表达式的类型
D.函数返回值表达式类型与返回值类型不同时,函数表达式类型应转换成函数返回值类型
第4题:
下列的哪个程序段可能导致错误?
A.String s = "hello"; String t = "good"; String k = s + t;
B.String s = "hello"; String t; t = s[3] + "one";
C.String s = " hello "; String standard = s.toUpperCase( );
D.String s = "hello"; String t = s + "good";
第5题:
给出下列的代码,则以下哪个选项返回true? String s="hello"; String t="hello"; char c []= {'h','e','1','1','o'};A)s.equals(t);
A.t. equals(
B.;
C.s==t;
D.t==c;
第6题:
A.true
B.false
C.1
D.0
E.hello
第7题:
在函数的返回值类型与返回值表达式类型的描述中,错误的是( )。
A.函数返回值的类型是在定义函数时确定的,在函数调用时是不能改变的
B.函数返回值的类型就是返回值表达式的类型
C.函数返回值的类型与返回值类型不同时,函数表达式类型应转换成返回值类型
D.函数返回值的类型决定了返回值表达式的类型
第8题:
假设有以下代码: String s="hello"; String t="hello"; char c[ ]={'h','e','l','l','o'}; 下列选项中,返回false的语句是______。
A.s.equals(t);
B.t.equals(c);
C.s==t;
D.t.equals(new String("hello"));
第9题:
给出下列的代码则以下哪个选项返回true? String s = "hello" ; String s = "hello" ; char c[] = { 'h' ,'e','l','o'};
A.s.equals(t);
B.t.equals(c);
C.s = =t
D.t = = c;
第10题:
以下( )表达式是不合法的。
A.string x="hello";int y=9;x+=y;
B.string x="hello";int y=9;if(x=y){}
C.string x="hello";int y=9;x=x+y;
D.string x=null;inty=(x!=null)&&(x.length()>0)?x.length():0;