There's a new cafeteria at the c

题目

There's a new cafeteria at the corner. How about going there for supper? ()

  • A、Fine. But it‘s my treat this time.
  • B、It‘s newly decorated.
  • C、Let‘s look at the menu first.
  • D、I have no idea about what to order.
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

A pencil-sharpener can be bought at ________.

A. the stationer’s

B.a department store

C.a hardware shop

D.a cafeteria


答案:B

解析:句意为:卷笔刀可以在()买到。stationor意为“文具店”,department store意为“百货公司”,hardware shop意为“五金店”,cafeteria意为“自助餐厅”,A选项stationor加所有格表示“文具店的”,所以答案选B。

第2题:

下列语句能给数组赋值而不使用for循环的是

A.myArray{[1]="One";[2]="Two";[3]="Three";}

B.String s[5]=new String[]{"Zero", "One", "Two", "There", "Four"};

C.String s[]=new String[]{"Zero", "One", "Two", "There", "Four"};

D.String s[]=new String[]=|"Zero", "One", "Two", "There", "Four"};


正确答案:C
解析:A)、D)语法不正确,B)中s[5]的形式只能通过for循环的格式进行赋值,而不能直接赋值。C)中表达式左侧的“[]”说明现在定义一个数组,不需要指明数组长度,而表达式右侧“[]”在后面直接紧跟初始内容时也是不需要指定数组大小的,数组大小直接由初值长度决定。

第3题:

下列Application程序中,指定as为字符串数组类型,先创建一个HashSet对象并赋值,然后在屏幕输出s,请将程序补充完整。

import java.util.*;

public class test17_1{

public static void main(String[] args){

__________s=new HashSet();

s.add("Hello");

s.add("World");

s.add(new Character('我'));

s.add(new Integer(23));

s.add("Hello");

__________as={"W","o","r","1","d"};

s.add(as);

s.add(null);

s.add(new Integer(23));

s.add(null);

System.out.println(__________);


正确答案:Set String[] s
Set String[] s

第4题:

A suitable title for this text might be( )

[A] How to Develop U.S. Economy

[B] The Relation between American Industry and New Economy

[C]Digital Engine Powers New Economy

[D] Our New Policy on Economy


正确答案:C

第5题:

下列语句输出结果为( )。 public class test { public static void main(StringArgsl[]) { String s1=new String("How"); String s2=new String("How"); System.out.println(!(s1==s2)); } }

A.false

B.true

C.1

D.0


正确答案:B

第6题:

下列程序段: String s1=new String("How"); String s2=new String("How"); System.out.println(!(s1==s2)); 的结果为

A.false

B.true

C.1

D.0


正确答案:B

第7题:

写出程序运行的结果

Public class Base

Public virtual string Hello() {return “Base”;}

Public class Sub:Base

Public override string Hello() {return “Sub”;}

1. Base b = new Base(); b.Hello;

2. Sub s = new Sub(); s.Hello;

3. Base b = new Sub (); b.Hello;

4. Sub s = new Base(); s.Hello;


正确答案:
 

第8题:

I broke Tom's teacup yesterday, so I had to buy him _______.

A.a new one

B.an new one

C.the new one

D.one new


参考答案:A

第9题:

下列语句能给数组赋值,而不使用for循环的是

A.myArray{[1]="One";[2]="Two";[3]="Three";}

B.String s[5]=new String[] {"Zero","One","Two","Three","Four"};

C.String s[]=new String[] {"Zero","One","Two","Three","Four"};

D.String s[]=new String[]= {"Zero","One","Two","Three","Four"};


正确答案:C
解析:字符串数组赋初值的方法有两种,一种是如选项C一样初始化。另外一种是先为每个数组元素分配引用空间,再为每个数组元素分配空间并赋初值。例如还可做如下赋值:
  string s[]=new String[5];
  s[0]="Zero";
  s[1]="One";
  s[2]="Two";
  s[3]="Three";
  s[4]="Four";

第10题:

public class TestString3 {  public static void main(String[] args) {  // insert code here  System.out.println(s);  }  }  Which two code fragments, inserted independently at line 3, generate the output 4247?()

  • A、 String s = “123456789”; s = (s-”123”).replace(1,3,”24”) - “89”;
  • B、 StringBuffer s = new StringBuffer(”123456789”); s.delete(0,3).replace( 1,3, “24”).delete(4,6);
  • C、 StringBuffer s = new StringBuffer(”123456789”); s.substring(3,6).delete( 1 ,3).insert(1, “24”);
  • D、 StringBuilder s = new StringBuilder(”123456789”); s.substring(3,6).delete( 1 ,2).insert( 1, “24”);
  • E、 StringBuilder s = new StringBuilder(”123456789”); s.delete(0,3).delete( 1 ,3).delete(2,5).insert( 1, “24”);

正确答案:B,E

更多相关问题