给出如下声明:Strings=“Example”;合法的代码由哪些?()
A.s>>>=3
B.s[3]=“X”
C.inti=s.iength()
D.s=s+1
A.s>>>=3
B.s[3]=“X”
C.inti=s.iength()
D.s=s+1
第1题
A.正确运行,输出:A
B.编译时发生错误
C.正确运行,输出:B
D.运行时引发异常
第2题
A.s3=s1+s2
B.s3=s1-s2
C.s3=s1&s2
D.s3=s1&&s2
第3题
A.jumbled
B.cluttered
第4题
写出用广义表表示法表示的树的类声明,并给出如下成员函数的实现:
(1)operator>>()接收用广义表表示的树作为输人,建立广义表的存储表示;
(2)复制构造函数用另一棵表示为广义表的树初始化棵树;
(3)operator==()测试用广义表表示的两棵树是否相等
(4)operator<<()用广义表的形式输出一棵树;
(5)析构函数清除一棵用广义表表示的树。
第5题
classA
{
classDog
{
privateStringname;
privateintage;
publicintstep;
Dog(Strings,inta)
{
name=s;
age=a;s
tep=0;
}
publicvoidrun(Dogfast)
{
fast.step++;
}
}
publicstaticvoidmain(Stringargs[])
{
Aa=newA();
Dogd=a.newDog("Tom",3);
d.step=25;
d.run(d);
System.out.println(d.step);
}
}
第6题
__________A. exhaust B. exerciseC. exam D. exact
第7题
Before he was caught(A) cheating on the exam(B), Oliver was considered(C) to be an honest(D)boy.
第8题
______ she got the first place in the final exam made her very happy.
A.That
B.What
C.It
D.When
第10题
A.getParameterValue(Strings)
B.getValue(Strings)
C.getParameterNames(Strings)
D.getParameter(Strings)
第11题
A.To help
B.Helping
C.Helped
D.Having helped