If list1 and list2 are both created as array data types, what will be the result of the following assignment statement? list2 = list1
A) The values in the array list1 will be copied to the array list2.
B) The values in the array list2 will be copied to the array list1.
C) The reference to array list2 will be copied to the array list1.
D) The reference to array list1 will be copied to the array list2.
A) The values in the array list1 will be copied to the array list2.
B) The values in the array list2 will be copied to the array list1.
C) The reference to array list2 will be copied to the array list1.
D) The reference to array list1 will be copied to the array list2.
D) The reference to array list1 will be copied to the array list2
Once the array is created, its size __.
A) Can be changed by changing the array.length property.
B) Cannot be changed.
C) Can be increased but not decreased.
D) Can be decreased but not increased.
A) Can be changed by changing the array.length property.
B) Cannot be changed.
C) Can be increased but not decreased.
D) Can be decreased but not increased.
B) Cannot be changed.
In the two-dimensional array, table1, to reference an element at row 3 column 4, use:
A) table1[3,4]
B) table1[3][4]
C) table1(3,4)
D) table1(3)(4)
A) table1[3,4]
B) table1[3][4]
C) table1(3,4)
D) table1(3)(4)
B) table1[3][4]
variablename and VariableName would mean refer to the same variable in Java.
A) True
B) False
A) True
B) False
B) False
The Java runtime system tracks memory allocation and automatically reclaims space that is no longer useful through a process known as garbage collection.
A) True
B) False
A) True
B) False
A) True
Which of the following statements are true?
A) When creating a numeric array, the default value is zero.
B) When creating a char array, the default value is '\u0000'.
C) When creating a boolean array, the default value is false.
D) All of the above statements are true.
A) When creating a numeric array, the default value is zero.
B) When creating a char array, the default value is '\u0000'.
C) When creating a boolean array, the default value is false.
D) All of the above statements are true.
D) All of the above statements are true.
For a parameter of array type values, changing the value of the local parameter inside the method does affect the value of the original array that was passed as the argument.
A) True
B) False
A) True
B) False
A) True
When declaring a variable, it is identified as an array by the use of:
[ ] brackets to declare and the new statement to create an array.
Which of the following is invalid syntax for declaring, creating and initializing an array?
A) double [ ] myList = {1.9, 2.9, 3.4, 3.5};
B) double myList [ ] = {1.9, 2.9, 3.4, 3.5};
C) [ ] double myList = {1.9, 2.9, 3.4, 3.5};
D) None of the above statements is invalid.
A) double [ ] myList = {1.9, 2.9, 3.4, 3.5};
B) double myList [ ] = {1.9, 2.9, 3.4, 3.5};
C) [ ] double myList = {1.9, 2.9, 3.4, 3.5};
D) None of the above statements is invalid.
C) [ ] double myList = {1.9, 2.9, 3.4, 3.5};
The arraycopy method performs what action? Will it create a new array?
It copies the contents of a source array to a target array; NO.
If and array consists of 20 elements, the lowest array index will be 0 and the highest will be 20.
A) True
B) False
A) True
B) False
B) False
Kartensatzinfo:
Autor: somgaet
Oberthema: Informatik
Thema: Java
Veröffentlicht: 26.04.2010
Schlagwörter Karten:
Alle Karten (14)
keine Schlagwörter