CS Awesome - Unit 7 Vocabulary

studied byStudied by 4 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 12

flashcard set

Earn XP

Description and Tags

ArrayLists

13 Terms

1

Autoboxing

Automatically wrapping a primitive type in a wrapper class object. For instance if you try to add an int value to a list, it will automatically be converted to an Integer object.

New cards
2

Abstract Method

A method that only has a declaration and no method body (no code inside the method).

New cards
3

ArrayList

An ArrayList can hold many objects of the same type. It can grow or shrink as needed. You can add and remove items at any index.

New cards
4

Add

You can add an object to the end of a list using listName.add(obj). You can add an object at an index of a list using add(index,obj). This will first move any objects at that index or higher to the right one position to make room for the new object.

New cards
5

Declaration

To declare an ArrayList use ArrayList
New cards
6

Creation

To create an ArrayList use new ArrayList
New cards
7

Get

To get an object at an index from a list use listName.get(index).

New cards
8

Index

You can access and set values in a list using an index. The first element in a list called list1 is at index 0 list1.get(0). The last element in a list is at the length minus one - list1[list1.size() - 1].

New cards
9

Remove

To remove the object at an index use ListName.remove(index). This will move all object past that index to the left one index.

New cards
10

Set

To set the value at an index in a list use listName.set(index,obj).

New cards
11

Size

Use listName.size() to get the number of objects in the list.

New cards
12

Wrapper Class

Classes used to create objects that hold primitive type values like Integer for int, Double for double and Boolean for boolean.

New cards
13

Unboxing

Automatically converting a wrapper object like an Integer into a primitive type such as an int.

New cards

Explore top notes

note Note
studied byStudied by 22 people
712 days ago
5.0(1)
note Note
studied byStudied by 40 people
827 days ago
5.0(1)
note Note
studied byStudied by 27 people
875 days ago
5.0(1)
note Note
studied byStudied by 32 people
898 days ago
5.0(2)
note Note
studied byStudied by 4 people
661 days ago
5.0(1)
note Note
studied byStudied by 35 people
645 days ago
4.0(1)
note Note
studied byStudied by 35 people
349 days ago
5.0(1)
note Note
studied byStudied by 15448 people
658 days ago
4.8(60)

Explore top flashcards

flashcards Flashcard (84)
studied byStudied by 20 people
417 days ago
5.0(2)
flashcards Flashcard (82)
studied byStudied by 10 people
744 days ago
5.0(3)
flashcards Flashcard (115)
studied byStudied by 93 people
640 days ago
5.0(1)
flashcards Flashcard (153)
studied byStudied by 10 people
49 days ago
5.0(1)
flashcards Flashcard (55)
studied byStudied by 156 people
418 days ago
5.0(1)
flashcards Flashcard (29)
studied byStudied by 3 people
113 days ago
5.0(1)
flashcards Flashcard (60)
studied byStudied by 76 people
269 days ago
5.0(1)
flashcards Flashcard (34)
studied byStudied by 55 people
308 days ago
5.0(2)
robot