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
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.
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};
Flashcard set info:
Author: somgaet
Main topic: Informatik
Topic: Java
Published: 26.04.2010
Card tags:
All cards (14)
no tags