Question
Question 1 Which of the following is NOT one of the three categories of collections we have studied? 1 Map 2 Set 3 Iterator 4
Question 1 Which of the following is NOT one of the three categories of collections we have studied?
1 Map
2 Set
3 Iterator
4 List
Flag this Question Question 2 Which of the following is NOT a wrapper class?
1 String
2 Integer
3 Character
4 Double
Flag this Question Question 3 Which of the following kinds of things may be stored directly in an ArrayList?
1 primitive values
2 object references
3 None of the above
4 Either of these two kinds of data
Flag this Question Question 4 In this declaration: ArrayList
1 a variable
2 a collection
3 a type argument
4 a wrapper class
Flag this Question Question 5 In this declaration: ArrayList
1 Array
2 ArrayList
3 Point
4 ArrayList
5 None of the above
Flag this Question Question 6 If this method call: myList.size() returns the value 7, what is the range of legal values allowed for the variable x in the following method call? myList.get( x )
1 x may be any int value
2 1 thru 7
3 0 thru 7
4 0 thru 6
Flag this Question Question 7
Assume that the following code has been executed (same for Questions 7 thru 10):
ArrayList
1 5
2 4
3 0
4 2
5 3
Flag this Question Question 8
Assume that the following code has been executed (same for Questions 7 thru 10):
ArrayList
1 0,0
2 12,16
3 5,10
4 None -- the statement throws a runtime exception
5 4,8
Flag this Question Question 9
Assume that the following code has been executed (same for Questions 7 thru 10):
ArrayList
1 12,16
2 -5,5
3 4,8
4 None -- the statement throws a runtime exception
5 0,0
Flag this Question Question 10
Assume that the following code has been executed (same for Questions 7 thru 10):
ArrayList
1 -5,5
2 The value null is returned
3 5,10
4 4,8
5 None -- the statement throws a runtime exception
Flag this Question Question 11
Assume that the following code has been executed (same for Questions 11 thru 14):
ArrayList
1 4
2 7
3 5
4 6
5 2
Flag this Question Question 12
Assume that the following code has been executed (same for Questions 11 thru 14):
ArrayList
1 76
2 15
3 78
4 50
5 26
Flag this Question Question 13
Assume that the following code has been executed (same for Questions 11 thru 14):
ArrayList
1 4
2 5
3 1
4 7
5 6
Flag this Question Question 14
Assume that the following code has been executed (same for Questions 11 thru 14):
ArrayList
1 12
2 15
3 6
4 11
5 32
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started