ArrayList Worksheet 1
By Mickey Arnold
starstarstarstarstarstarstarstarstarstar
Last updated 10 months ago
14 Questions
Do not put this in eclipse. It is not for a grade, so see if you get what is happening.
1 point
1
Question 1
1.
What is the output of System.out.println(sam.get(0)); // LINE 1?
What is the output of System.out.println(sam.get(0)); // LINE 1?
1 point
1
Question 2
2.
What is the output of System.out.println(sam.get(2)); // LINE 2?
What is the output of System.out.println(sam.get(2)); // LINE 2?
1 point
1
Question 3
3.
What is the output of System.out.println(sam.set(1, "up")); // LINE 3?
What is the output of System.out.println(sam.set(1, "up")); // LINE 3?
1 point
1
Question 4
4.
What is the output of System.out.println(sam.indexOf("ben")); // LINE 4?
What is the output of System.out.println(sam.indexOf("ben")); // LINE 4?
1 point
1
Question 5
5.
What is the output of System.out.println(sam.contains("sam")); // LINE 5?
What is the output of System.out.println(sam.contains("sam")); // LINE 5?
1 point
1
Question 6
6.
What is the output of System.out.println(sam); // LINE 6?
What is the output of System.out.println(sam); // LINE 6?
1 point
1
Question 7
7.
What is the output of System.out.println(sam); // LINE 7?
What is the output of System.out.println(sam); // LINE 7?
1 point
1
Question 8
8.
What is the output of System.out.println(sam); // LINE 8?
What is the output of System.out.println(sam); // LINE 8?
1 point
1
Question 9
9.
What is the output of System.out.println(sam); // LINE 9?
What is the output of System.out.println(sam); // LINE 9?
1 point
1
Question 10
10.
What is the output of System.out.println(sam); // LINE 10?
What is the output of System.out.println(sam); // LINE 10?
1 point
1
Question 11
11.
What is the output of System.out.println(sam); // LINE 11?
What is the output of System.out.println(sam); // LINE 11?
1 point
1
Question 12
12.
What is the output of the for loop at LINE 12?
What is the output of the for loop at LINE 12?
1 point
1
Question 13
13.
What is the output of System.out.println(sam); // LINE 13?
What is the output of System.out.println(sam); // LINE 13?
1 point
1
Question 14
14.
What is the output of System.out.println(sam); // LINE 14?
What is the output of System.out.println(sam); // LINE 14?