Java Data Structures, Interfaces, and Abstract Classes

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/20

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards for Map and Set methods, Comparable, Locatable, and Movable interfaces, and abstract class keywords.

Last updated 1:55 PM on 10/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

map.put(x, y)

Adds the

2
New cards

map.get(x)

Gets the value for key x.

3
New cards

map.containsKey(x)

Checks if key x is in the map.

4
New cards

map.keySet()

Returns a set of all keys in the map.

5
New cards

map.values()

Returns a collection of all values in the map.

6
New cards

map.size()

Returns the number of items in the map.

7
New cards

map.clear()

Removes all items from the map.

8
New cards

(Set)set.add(x)

Adds item x to the set.

9
New cards

(Set)set.remove(x)

Removes an item from the set.

10
New cards

(Set)set.size()

Returns the number of items in the set.

11
New cards

(Set)set.clear()

Removes all items from the set.

12
New cards

compareTo(Object o)

Interface method in Comparable used to compare the current object with another object.

13
New cards

Arrays.sort(list)

Sorts an array using the compareTo() method of each object.

14
New cards

getX()

Returns the x-coordinate (from Locatable interface).

15
New cards

getY()

Returns the y-coordinate (from Locatable interface).

16
New cards

setPos(x, y)

Sets x and y positions (from Movable interface).

17
New cards

setX(x)

Sets x position (from Movable interface).

18
New cards

setY(y)

Sets y position (from Movable interface).

19
New cards

abstract

Keyword used to declare an abstract class or an abstract method without a body.

20
New cards

toString()

Concrete method in superclass that prints object info or combined method outputs.

21
New cards

super(nm)

Calls the constructor of the super abstract class.