Question: 2 When an ArrayList is created, the size of the list is (1 Point) -1 o 100 1 0 0 a 10 3 Which code




![values[values.length] 0 values.get(last) 4 Which of the following would insert "Monday" into](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3b592afcfe_76266f3b59250c11.jpg)

2 When an ArrayList is created, the size of the list is (1 Point) -1 o 100 1 0 0 a 10 3 Which code segment would access the last element of an ArrayList of booleans called values? (1 Point) values.get(values.size() - 1) 0 values.get(values.size()) values.get(0) 0 values[values.length] 0 values.get(last) 4 Which of the following would insert "Monday" into the first position of a String ArrayList called days? (Assume days already contains some elements, and no original elements should be removed.) (1 Point) days.add(0,"Monday"); days.set(0, "Monday"); days.add(1, "Monday"); O O days.set(1, "Monday"); days.add("Monday"); 5 Which for loop header would correctly traverse an ArrayList called list backwards? Ti (1 Point) for (int i = list.size(); i>=0; i--) for(int i = 0; i > list.size(); i++) for (int i = list.size(); i > 0; i --) C for(int i = list.size()-1; i >=0; i--) for (int i = list.size() - 1; i > 0; i--) 6 Tor F: An ArrayList can only be declared to store elements of a reference data type. (1 Point) True False 7 What best describes the purpose of the mystery method, seen here: 1) (1 Point) - public static int mystery(ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
