题目内容

Look at the following code:(情看下列语句:)Integer myNumber = new Integer(5);int var = myNumber;Which of the following is true about the second statement?(关于第二个语句,下列哪一项是正确的?)

A. It results in an error because you can not assign a wrapper class object to a primitive variable.(它导致错误,因为不能将包装类对象分配给原始变量。
B. The statement performs auto boxing.(该语句执行自动封装)
C. The statement performs unboxing (语句执行解绑)
D. The statement performs unwrapping.(语句执行展开)

查看答案
更多问题

Look at the following code.(请看下列代码)Integer myNumber;myNumber = 5;Which of the following is true about the second statement?(关于第二个语句,下列哪一项是正确的?)

A. It results in an error because you can not assign a primitive type to a wrapper class object.(它会导致错误,因为不能将原始类型分配给包装类对象。)
B. The statement performs auto boxing.(语句执行自动封装)
C. The statement performs unboxing.(语句执行解绑)
D. The statement performs auto wrapping.(语句执行自动包装)

What will be the tokens in the following statement?(以下语句中的标记将是什么?)String str = "red$green&blue#orange"; String tokens = str.split("[$&#]");

A. "red", "green", "blue"and"orange"
B. "$", "&", and"
C. "
D. "[", "$", "&", "
E. ", and"]"
F. None of theabove

Which of the following statements will print the maximum value an int variable may have?(下列哪一条语句将打印int变量可能具有的最大值?)

A. System.out.println(MAX_VALUE);
B. System.out.println(integer.MAX_VALUE);
C. System.out.println(Integer.MAX_VALUE);
D. System.out.println(INTEGER.MAX_VALUE);

Autoboxing is:(自动封装是:)

A. Java’s process of automatically “boxing up” a value inside an object(Java在对象内部自动“封装”一个值的过程)
B. The automatic allocation array elements(自动分配数组元素)
C. The process of assigning a default value to primitive data types(为原始数据类型分配默认值的过程)
D. The process of identifying tokens in a string(识别字符串中的标记的过程)

答案查题题库