What this deck covers
This deck focuses on Arraylist Methods, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science a.
Study Arraylist Methods in AP Computer Science a with focused flashcards that help you recognize the idea, recall the key rule, and apply it in practice-style prompts.
0% Complete
Identify the method that removes an element at a specified index in an ArrayList.
Tap card or press Space to flip
remove(int index). Removes by index and returns the removed element.
How well did you know it?
Card 1 / 60
Space to flip · ← / → to move · once flipped, → Got it · ← Still learning
This deck focuses on Arraylist Methods, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science a.
Work through these flashcards in short sessions. Try to answer each prompt before flipping the card, then revisit any cards you miss until the explanation feels automatic.
Answer: remove(int index). Removes by index and returns the removed element.
Answer: IndexOutOfBoundsException. Thrown when index < 0 or >= size().
Answer: remove(Object o). Searches and removes by value, not index.
Answer: Returns the element at the specified index. Accesses elements without modifying the ArrayList.
Answer: contains(Object o). Returns true if element exists in the list.
Answer: IndexOutOfBoundsException. Thrown when index < 0 or >= size().
Answer: Returns the element that was removed. Returns the element that was at the index.
Answer: addAll(int index, Collection<? extends E> c). Shifts existing elements to accommodate new ones.
Answer: Returns hash code value for the list. Computed from elements for hashing collections.
Answer: lastIndexOf(Object o). Searches backwards from the end of the list.
Answer: clear(). Removes all elements, making the list empty.
Answer: True if the element is successfully removed. Returns false if element was not found.
Answer: contains(Object o). Returns true if element exists in the list.
Answer: addAll(int index, Collection<? extends E> c). Shifts existing elements to accommodate new ones.
Answer: addAll(Collection<? extends E> c). Adds all elements to the end sequentially.
Answer: retainAll(Collection<?> c). Keeps only common elements between collections.
Answer: Throws ConcurrentModificationException. Prevents corruption from simultaneous modifications.
Answer: remove(int index). Removes by index and returns the removed element.
Answer: clear(). Removes all elements, making the list empty.
Answer: Throws ConcurrentModificationException. Prevents corruption from simultaneous modifications.
Answer: Checks if the ArrayList is empty. Returns true if size equals zero.
Answer: iterator(). Enables traversal through enhanced for loops.
Answer: iterator(). Enables traversal through enhanced for loops.
Answer: lastIndexOf(Object o). Searches backwards from the end of the list.
Answer: String representation of the list. Shows elements in bracket-separated format.
Answer: Throws IndexOutOfBoundsException if index is out of range. When index is negative or >= size().
Answer: set(int index, E element). Replaces existing element and returns old value.
Answer: Converts the ArrayList to an array. Creates Object array containing list elements.
Answer: Returns index of first occurrence of an element. Returns -1 if element is not found.
Answer: String representation of the list. Shows elements in bracket-separated format.
Answer: Returns a view of a portion of the list. Creates sublist that reflects changes to original.
Answer: Converts the ArrayList to an array. Creates Object array containing list elements.
Answer: Adds an element to the ArrayList. Inserts elements at the end or specified position.
Answer: equals(Object o). Compares element-by-element for structural equality.
Answer: clone(). Creates independent copy with same elements.
Answer: clone(). Creates independent copy with same elements.
Answer: True if the element is successfully removed. Returns false if element was not found.
Answer: Returns a view of a portion of the list. Creates sublist that reflects changes to original.
Answer: Checks if the ArrayList is empty. Returns true if size equals zero.
Answer: Returns hash code value for the list. Computed from elements for hashing collections.
Answer: Returns the element at the specified index. Accesses elements without modifying the ArrayList.
Answer: size(). Returns the current number of stored elements.
Answer: add(int index, E element). Inserts element and shifts existing elements right.
Answer: removeAll(Collection<?> c). Removes elements that exist in both collections.
Answer: sort(Comparator<? super E> c). Orders elements according to comparison logic.
Answer: size(). Returns the current number of stored elements.
Answer: sort(Comparator<? super E> c). Orders elements according to comparison logic.
Answer: Returns the element that was removed. Returns the element that was at the index.
Answer: equals(Object o). Compares element-by-element for structural equality.
Answer: retainAll(Collection<?> c). Keeps only common elements between collections.
Answer: Returns index of first occurrence of an element. Returns -1 if element is not found.
Answer: remove(Object o). Searches and removes by value, not index.
Answer: equals(Object o). Compares element-by-element for structural equality.
Answer: Throws IndexOutOfBoundsException if index is out of range. When index is negative or >= size().
Answer: set(int index, E element). Replaces existing element and returns old value.
Answer: removeAll(Collection<?> c). Removes elements that exist in both collections.
Answer: addAll(Collection<? extends E> c). Adds all elements to the end sequentially.
Answer: Adds an element to the ArrayList. Inserts elements at the end or specified position.
Answer: add(int index, E element). Inserts element and shifts existing elements right.
Answer: equals(Object o). Compares element-by-element for structural equality.