题目内容 (请给出正确答案)
有语句String s=”hello world”; ,以下操作哪个是不合法的?A. int i=s.length();B. s>>
[单选]

有语句String s=”hello world”; ,以下操作哪个是不合法的?

A、int i=s.length();

B、 s>>>=3;

C、 String ts=s.trim()

D、 String t=s+”!”;

查看答案
更多“有语句String s=”hello world…”相关的问题
第1题
有语句Strings=”hello world”;,以下操作()是不合法的。

A、int i=s.length();

B、s>>>=3;

C、String ts=s.trim();

D、String t=s+”!”;

点击查看答案
第2题
设有如下变量char c = 'c';int i = 10;double d = 10;long l = 1;String s = "Hello";以下哪些语句编译不出错?
A.c=c+i;
B. s+=i;
C. i+=s;
D. c+=s;

请帮忙给出正确答案和分析,谢谢!
点击查看答案
第3题
设有类定义如下:class Base{public Base(int i){}}public class MyOver extends Base{public
设有类定义如下:
class Base{
public Base(int i){}
}
public class MyOver extends Base{
public static void main(String arg[]){
MyOver m = new MyOver(10);
}
MyOver(int i){
super(i);
}
MyOver(String s, int i){
this(i);
//Here
}
}
以下哪条语句可以安排在//Here处 ?
A.MyOver m = new MyOver();
B.super();
C.this("Hello",10);
D.Base b = new Base(10);

请帮忙给出正确答案和分析,谢谢!
点击查看答案
第4题
给定以下程序段//insertcodepublicclassfoo(publicstaticvoidmain(String[]args)throwsExcepti
给定以下程序段
//insertcodepublicclassfoo(publicstaticvoidmain(String[]args)throwsExceptionprintWriterout=newPrintWriter(new java.io.outputStreamWriter(System.out),true);out.printIn(“Hello”);要使程序能正确运行,在//insertcode处必须添加()语句。
A.importjava.io.PrintWriter;
B.includejava.io.PrintWriter;
C.importjava.io.OutputStreamWriter;
D.includejava.io.OutputStreamWriter;

请帮忙给出正确答案和分析,谢谢!
点击查看答案
第5题
创建一个字符串类型的数据,以下选项中,赋值语句正确的是()

A、w = "hello

B、w = hello

C、w = "hello'

D、w = "hello

点击查看答案
第6题
将字符串string s="9753";转换为int类型,下列语句正确的有()

A、int n=int.Parse(s)

B、int n=int.ValueOf(s)

C、int n=Convert.ToDouble(s)

D、int n=Convert.ToInt32(s)

点击查看答案
第7题
运行代码,打印结果为()

A、s='hello world'

B、print(s.find('w'))

C、5

D、6

E、7

F、8

点击查看答案
第8题
已知赋值语句 s=”Good Bye!”,则下列定义变量s正确的是()

A、im s as integer

B、im s as string

C、im s as double

D、im s as long

点击查看答案
第9题
在 VB 程序设计中,下列语句在编译中或运行后一定会发生错误提示的是()

A、Dim text As String

B、If f Then x=x*x+1

C、s="cd"+3

D、s=Mid("abc123",3)

点击查看答案
第10题
听力原文:W: Hello, this is Green Mail Order Service. How can I help you?M: I'm calling to
听力原文:W: Hello, this is Green Mail Order Service. How can I help you?
M: I'm calling to order a men's cashmere sweater from your mail order catalogue. The item number is S6489, and I want a large size one. How long will it take to deliver?
W: Let me see. We' II send it to you by courier this afternoon. You will probably get it by tomorrow afternoon. How do you want to pay? Bank transfer, credit or cash on delivery?
M: I'd like to pay by bank transfer.
What is the purpose of the man' s call to the woman?
A.To complain about a sales clerk
B.To ask the number of an item
C.To withdraw some money
D.To place an order
点击查看答案
第11题
听力原文:M: Hello, professor Johnson.W: Hello, Tony. So what shall we work on today?M: Wel
听力原文:M: Hello, professor Johnson.
W: Hello, Tony. So what shall we work on today?
M: Well, the problem is that this writing assignment isn't coming out right. What I thought I was writing on was to talk about what a particular sport means to me when I participate in.
W: What sport did you choose?
M: I decided to write about cross-country skiing.
W: What are you going to say about skiing?
M: That's the problem. I thought I would write about how peaceful it is to be out in the country.
W: So why is that a problem?
M: I'd like to start describing how quiet it is to be out in the woods. I keep mentioning how much effort it takes to keep going. Cross-country skiing isn't as easy as some people think. It takes a lot of energy, but that's not part of my paper, so I guess I should leave it out. But now I don't know how to explain that feeling of peacefulness without explaining how hard you have to work for it. It all fits together. It's not like just sitting down somewhere and watching the clouds roll by. That's different.
W: Then you'll have to include that in your point. The peacefulness of cross-country skiing is the kind you earn by effort. Why leave that out? Part of your point you knew beforehand, but part you discovered as you wrote. That's common, right?
M: Yeah, I guess so.
Questions:
19. What is the topic of the man's writing assignment?
20. What problem does the man have while working on his paper?
21. What does the woman say is common in writing papers?
(20)
A.Beautiful scenery in the countryside.
B.Dangers of cross-country skiing.
C.Pain and pleasure in sports.
D.A sport he participates in.
点击查看答案
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
搜题
如果结果不匹配,请 联系老师 获取答案
搜索
如果结果不匹配,请 联系老师 获取答案