AP计算机教程2-12:困难多选题
0:00
Which of the following would be the correct result from the following expression: 150 (in decimal) – 21 (in octal) + 101 (in binary) – E (in hexadecimal)?
\(150-17+5-14=124\)
5
Given the following code are the contents of itemArray and val after a call of mod(itemArray,val)?
int[] itemArray = {9, 8, 7, 6};
int val = 5;
public static void mod(int[] a, int value)
{
for (int i=0; i < a.length; i++)
{
a[i] = i;
}
value = a[a.length-1];
}
把基本数据类型作为参数时,Java会创建变量值的副本。把数组或object作为参数时,Java则会创建其引用的副本。因而对于基本数据类型的修改不会影响原始值,而对于对象和数组的修改则会改变原始值。
2
0 条评论