ArrayList Worksheet 1
star
star
star
star
star
Last updated over 1 year ago
14 questions

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
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
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
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
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
What is the output of System.out.println(sam); // LINE 6?
What is the output of System.out.println(sam); // LINE 6?
1
What is the output of System.out.println(sam); // LINE 7?
What is the output of System.out.println(sam); // LINE 7?
1
What is the output of System.out.println(sam); // LINE 8?
What is the output of System.out.println(sam); // LINE 8?
1
What is the output of System.out.println(sam); // LINE 9?
What is the output of System.out.println(sam); // LINE 9?
1
What is the output of System.out.println(sam); // LINE 10?
What is the output of System.out.println(sam); // LINE 10?
1
What is the output of System.out.println(sam); // LINE 11?
What is the output of System.out.println(sam); // LINE 11?
1
What is the output of the for loop at LINE 12?
What is the output of the for loop at LINE 12?
1
What is the output of System.out.println(sam); // LINE 13?
What is the output of System.out.println(sam); // LINE 13?
1
What is the output of System.out.println(sam); // LINE 14?
What is the output of System.out.println(sam); // LINE 14?