Exam 14: Generics and the Arraylist Class
Exam 1: Getting Started45 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control44 Questions
Exam 4: Defining Classes I45 Questions
Exam 5: Defining Classes II46 Questions
Exam 6: Arrays46 Questions
Exam 7: Inheritance43 Questions
Exam 8: Polymorphism and Abstract Classes43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 11: Recursion44 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class32 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections,maps,and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends26 Questions
Exam 20: Applets25 Questions
Select questions type
The Type parameter is always indicated as a T.
Free
(True/False)
4.8/5
(38)
Correct Answer:
False
All of the following are memory management methods of the ArrayList class except:
Free
(Multiple Choice)
4.8/5
(26)
Correct Answer:
B
You can plug in a primitive type for a type parameter.
Free
(True/False)
4.8/5
(40)
Correct Answer:
False
Which is the correct syntax for placing the string "boat" into an ArrayList name recVehicles in position 3 for the first time?
(Multiple Choice)
4.8/5
(38)
All of the following are search methods of the ArrayList class except:
(Multiple Choice)
4.9/5
(44)
All of the following are methods of the ArrayList class except:
(Multiple Choice)
4.7/5
(33)
A class obtained from a generic class by plugging in a type for the type parameter is said to ________ the generic class.
(Multiple Choice)
4.8/5
(45)
A/An ____________ can change the length while the program is running.
(Multiple Choice)
4.9/5
(43)
Rewrite the following line of code,but use type inference.
ArrayList< Integer > mylist = new ArrayList< Integer >);
(Essay)
5.0/5
(39)
When using ArrayLists the method _______ can be used to save memory:
(Multiple Choice)
4.9/5
(31)
To place an element in an ArrayList position for the first time,you usually use the method:
(Multiple Choice)
4.8/5
(31)
Inheritance is the reason why some parameters of the ArrayList class are of type Base_Type and others of type Object.
(True/False)
4.9/5
(40)
The keyword ___________ can be used to place a bound on a type parameter.
(Multiple Choice)
4.9/5
(43)
ArrayList objects do not have the array square-bracket notation.
(True/False)
4.8/5
(37)
Class and method definitions that include parameters for types are called:
(Multiple Choice)
5.0/5
(39)
A generic class can be instantiated as any of the following base types except:
(Multiple Choice)
5.0/5
(40)
Showing 1 - 20 of 32
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)