List Quiz
By Mickey Arnold
starstarstarstarstarstarstarstarstarstar
Last updated 10 months ago
16 Questions
1 point
1
Question 1
1.
What is output by the code below?
List<String> list = new ArrayList<String>();
list.add("it");
list.add("up");
list.add("go");
System.out.println(list);
What is output by the code below?
List<String> list = new ArrayList<String>();
list.add("it");
list.add("up");
list.add("go");
System.out.println(list);
1 point
1
Question 2
2.
What is output by the code below?
List<Integer> list = new ArrayList<Integer>();
list.add(8);
list.add(5);
list.add(6);
list.remove(0);
System.out.println(list);
What is output by the code below?
List<Integer> list = new ArrayList<Integer>();
list.add(8);
list.add(5);
list.add(6);
list.remove(0);
System.out.println(list);
1 point
1
Question 3
3.
Question 3: What is output by the code below?
List<Integer> list = new ArrayList<Integer>();
list.add(8);
list.add(5);
list.add(6);
list.remove(2);
System.out.println(list);
Question 3: What is output by the code below?
List<Integer> list = new ArrayList<Integer>();
list.add(8);
list.add(5);
list.add(6);
list.remove(2);
System.out.println(list);
1 point
1
Question 4
4.
Question 4: What is output by the code below?
List<Integer> list = new ArrayList<Integer>();
list.add(8);
list.add(2);
list.add(5);
list.add(6);
list.add(9);
list.remove(0);
System.out.println(list);
Question 4: What is output by the code below?
List<Integer> list = new ArrayList<Integer>();
list.add(8);
list.add(2);
list.add(5);
list.add(6);
list.add(9);
list.remove(0);
System.out.println(list);
1 point
1
Question 5
5.
Question 5: What is output by the code below?
ArrayList list = new ArrayList();
list.add("it");
list.add("go");
list.add("up");
System.out.println(list.get(0));
Question 5: What is output by the code below?
ArrayList list = new ArrayList();
list.add("it");
list.add("go");
list.add("up");
System.out.println(list.get(0));
1 point
1
Question 6
6.
1. _______________
1. _______________
1 point
1
Question 7
7.
2. _______________
2. _______________
1 point
1
Question 8
8.
3. _______________
3. _______________
1 point
1
Question 9
9.
4. _______________
4. _______________
1 point
1
Question 10
10.
5. _______________
5. _______________
1 point
1
Question 11
11.
6. _______________
6. _______________
1 point
1
Question 12
12.
7. _______________
7. _______________
1 point
1
Question 13
13.
8. _______________
8. _______________
1 point
1
Question 14
14.
9. _______________
9. _______________
1 point
1
Question 15
15.
10. _______________
10. _______________
5 points
5
Question 16
16.
PART 2 - DIRECTIONS : Write a return method named run that returns an integer. run takes in one parameter which is an list of integers named one. run will return the sum of all even values greater than 5 in the list one .
The call run( [ 3, 4, 5, 6, 7, 8, 9] ) would return 14
PART 2 - DIRECTIONS : Write a return method named run that returns an integer. run takes in one parameter which is an list of integers named one. run will return the sum of all even values greater than 5 in the list one .
The call run( [ 3, 4, 5, 6, 7, 8, 9] ) would return 14