CMS专题

多选题Which are syntactically valid statement at// point x?()     class Person {     private int a;  public int change(int m){  return m;  }     }  public class Teacher extends Person {     public int b;  public static void main(String arg[]){     Person p =

题目
多选题
Which are syntactically valid statement at// point x?()     class Person {     private int a;  public int change(int m){  return m;  }     }  public class Teacher extends Person {     public int b;  public static void main(String arg[]){     Person p = new Person();     Teacher t = new Teacher();    int i;  // point x     }    }
A

i = m;

B

i = b;

C

i = p.a;

D

i = p.change(30);

E

i = t.b.

参考答案和解析
正确答案: D,E
解析: A:m没有被申明过,不能使用。 
B:虽然b是类Teacher的public成员变量,但是在静态方法中不能使用类中的非静态成员。 
C://a是类Person的private成员,在类外不能直接引用。 
D://change(int m)方法是public方法,并且返回一个int型值,可以通过类的实例变量p引用并赋值给一个int型变量。 
E://b是类Teacher的public成员变量,且是int型,可以通过类的实例变量t引用并赋值给一个int型变量
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

The STUDENT_GRADES table has these columns:The registrar has asked for a report on the average grade point average (GPA) for students enrolled during semesters that end in the year 2000. Which statement accomplish this?()

A.

B.

C.

D.

E.

F.


参考答案:D

第2题:

Click the Exhibit button and examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP BY department_id);Which statement is true?()

A.The SELECT statement is syntactically accurate.

B.The SELECT statement does not work because there is no HAVING clause.

C.The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

D.The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


参考答案:A

第3题:

Exhibit:Examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP BY department_id);Which statement is true?()

A. The SELECT statement is syntactically accurate.

B. The SELECT statement does not work because there is no HAVING clause.

C. The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

D. The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


参考答案:A

第4题:

//point X  public class foo (  public static void main (String[]args) throws Exception {  printWriter out = new PrintWriter (new  java.io.outputStreamWriter (System.out), true;  out.printIn(“Hello”);  }  )   Which statement at PointX on line 1 allows this code to compile and run?()  

  • A、 Import java.io.PrintWriter;
  • B、 Include java.io.PrintWriter;
  • C、 Import java.io.OutputStreamWriter;
  • D、 Include java.io.OutputStreamWriter;
  • E、 No statement is needed.

正确答案:A

第5题:

At 0900,you take the following radar ranges: Watch Hill Point 5.4 miles; Block Island Grace Point 8.3 miles. Which statement is TRUE?

A.You are within 3 nautical miles of the coast

B.The bottom in the area is sand and gravel

C.The fix is indeterminate

D.You are governed by the Inland Rules


正确答案:C

第6题:

Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables:Which UPDATE statement is valid?()

A.

B.

C.

D.


参考答案:A

第7题:

Which statement describes the shore between Watch Hill Point and Point Judith?

A.Low,rocky cliffs with heavily wooded hills inland

B.Sandy beaches broken by rocky points

C.Sand dunes and beaches with a mud and sand bottom

D.Wooded,barren hills with isolated prominent buildings


正确答案:B

第8题:

Examine the structure if the EMPLOYEES and NEW EMPLOYEES tables:Which MERGE statement is valid?()

A.

B.

C.

D.


参考答案:A

第9题:

Which statement is TRUE concerning the flash point of a substance ________.

A.It is lower than the ignition temperature

B.It is the temperature at which a substance will spontaneously ignite

C.It is the temperature at which a substance,when ignited,will continue to burn

D.It is the temperature at which the released vapors will fall within the explosive range


正确答案:A

第10题:

All users within an office are wirelessly connected to a network, except one user that has a valid connection on a leased IP address in a different range. Which of the following is a possible cause of the user having a different IP address range?()

  • A、The wireless access point is using MAC address filtering
  • B、The user has connected to a nearby wireless access point from another office
  • C、The user has configured the wireless settings with the wrong encryption type
  • D、The wireless access point has SSID broadcast disabled

正确答案:B

更多相关问题