Unit 2 Quiz Flashcards
The length() method is used to check the size of a stack?
True or False
False
Which methods are used to add and remove items from a stack?
Push, pop
Which statement would properly add an element to an ArrayList called colors?
colors.add(“blue”);
Which methods are used to add and remove items from a Linked List?
add, remove
Which import statement should be used when using Array Lists?
import.java.util.ArrayList;
Which method below is NOT a member of the ArrayList class?
length()
The ArrayList, LinkedList, ArrayDeque classes and the List, queue, and Deque interfaces are part of which larger Java APT body?
Java Collections Framework
Which statement would access the 3rd element in an ArrayList called colors?
colors.get(2);
A Queue uses LIFO?
True or False
False, it uses FIFO
A Stack uses LIFO?
True or False?
True