答案查看网,轻松搜题/搜资源
登录
×
登录账号
记住密码
立即注册
忘记密码
×
注册
使用微信扫描二维码,获取账号密码后免费查看答案
前往登录
忘记密码
×
忘记密码
使用微信扫描下方二维码,即可找回您的账号密码
前往登录
立即注册
搜题/搜资源
【单选题】【消耗次数:1】
应用程序的main方法中有以下语句,则输出的结果是 ( )。 String s1=new String(abc); String s2=new String(abc); boolean b1=s1.equals(s2); boolean b2=(s1==s2); System.out.print(b1+ +b2);
①
true false
②
false true
③
true true
④
false false
参考答案:
复制
纠错
➡️如需代学继续教育,联系微信:yizhituziang
相关题目
【单选题】
有如下程序段: int a = b = 5; String s1 = 祝你今天考出好成绩!; String s2 = s1; 则表达式a == b与s2 == s1的结果分别是:( )。
①
true与true
②
false与true
③
true与false
④
false与false
查看完整题目与答案
【单选题】
设有以下字符串定义,则数组s1和s2( )。char s1[]={ S ,t, r ,i,n, gchar s2[]= String
①
长度相同,但内容不同
②
长度相同,内容也相同
③
长度不同,但内容相同
④
长度不同,内容也不同
查看完整题目与答案
【单选题】
若REPLACE(S,S1,S2)表示用字符串S2替换字符串S中的子串S1的操作,则对于S=“Beijing&Nanjing”,S1=“Beijing”,S2=“Shanghai”,REPLACE(S,S1,S2)=( )。
①
“Nanjing&Shanghai”
②
“Nanjing&Nanjing”
③
“ShanghaiNanjing”
④
“Shanghai&Nanjing”
查看完整题目与答案
【单选题】
设有两个串S1和S2,则StrCompare(S1,S2)运算称做( )。
①
串连接
②
模式匹配
③
求子串
④
串比较
查看完整题目与答案
【单选题】
设有两个串S1和S2,求串S2在S1中首次出现位置的运算称作( )。
①
连接
②
求子串
③
模式匹配
④
判断子串
查看完整题目与答案
【单选题】
下列程序段执行后的结果是( )。 String s = new String(abcdefg); for (int i=0; i<s.length(); i+=2){ System.out.print(s.charAt(i)); }
①
aceg
②
ACEG
③
abcdefg
④
abcd
查看完整题目与答案
【单选题】
#define X a+b main( ) { int a=3,b=4,s1; s1=2*X; printf(%d\n,s1); },以上程序的运行结果是( )?
①
8
②
14
③
10
④
6
查看完整题目与答案
【单选题】
若有说明:char s1='\067',s2='1';则变量s1,s2在内存中各占的字节数是()<br/>
①
11
②
41
③
31
④
12
查看完整题目与答案
【简答题】
#include stdio.hint main(){char a[]=I love China!,b[20],*p1,*p2;p1=a;p2=b; for(;*p1!=\0p1++,p2++)*p2=*p1; *p2=\0// printf(string a is:%s\n printf(string b is:%s\n return 0;}以上程序运行结果为string b is:[填空1]。
查看完整题目与答案
【单选题】
设sl、s2为字符变量,sl=How Are You!:s2=a,则sl.indexOf(s2)的结果是( )。
①
一1
②
4
③
5
④
以上都不是
查看完整题目与答案
随机题目
【单选题】
She will be much [填空] in her mew class.
①
happy
②
happier
③
happiest
④
happyer
查看完整题目与答案
【单选题】
Jan [填空] a dress when she has a phone call.
①
made
②
is making
③
was making
④
makes
查看完整题目与答案
【单选题】
My sister falls while she is [填空] her bicycle and hurts herself.
①
ride
②
rideing
③
riding
④
rides
查看完整题目与答案
【单选题】
He [填空] to us if he arrives.
①
writes
②
has written
③
will write
④
wrote
查看完整题目与答案
【单选题】
China has a large population than [填空] in the world.
①
all the countries
②
every country
③
any country
④
any other country
查看完整题目与答案
【判断题】
A: Lets go out for a meal next Saturday, OK? B: Why not?
①
正确
②
错误
查看完整题目与答案
【判断题】
A: Why not watch more English programmes on TV? B: All right, thank you.
①
正确
②
错误
查看完整题目与答案
【判断题】
A: Excuse me, have you got the time? B: Yes, I have.
①
正确
②
错误
查看完整题目与答案
【判断题】
A: How about a cup of tea? B: No, I dont drink.
①
正确
②
错误
查看完整题目与答案
【单选题】
There [填空] a meeting tomorrow.
①
will be going to
②
will going to be
③
is going to be
④
will go to be
查看完整题目与答案