CodeHS Unit 4

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

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:41 AM on 3/31/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

12 Terms

1
New cards

Encapsulation

Keeping data safe inside an object and controlling who can access or change it

2
New cards

How do you initialize an array called arr of 5 ints with default values?

int [] arr = new int [5];

3
New cards

Which index is the last element in an array called highTemps?

highTemps.length - 1;

4
New cards

When would you use an enhanced for loop instead of a traditional for loop?

If you want to access every element of an array and want to refer to elements through a variable name instead of an array index.

5
New cards

Primitives

Int, double, boolean, char

6
New cards

Can primitive values be replaced in enhanced for loops?

Cannot be replaced because an enhanced for loop makes a copy of the primitive value, so the copy is being replaced

7
New cards

Can ArrayLists use primitives?

No, they use objects

8
New cards

Wrapper classes

Integer, Double, Boolean, Character

9
New cards

Autoboxing

Java automatically converts primitive into object

10
New cards

Unboxing

Java automatically converts object into primitive

11
New cards

parseInt()

Converts a String into an int primitive

12
New cards

Declare an array

int[] nums;

Explore top notes

note
Structure  of an atom
Updated 1181d ago
0.0(0)
note
APUSH Chapters 1-4 Notes
Updated 433d ago
0.0(0)
note
English Poetry Unit Test
Updated 1277d ago
0.0(0)
note
Characters for Trojan War
Updated 1203d ago
0.0(0)
note
lokal_at_global_na_demand
Updated 414d ago
0.0(0)
note
Structure  of an atom
Updated 1181d ago
0.0(0)
note
APUSH Chapters 1-4 Notes
Updated 433d ago
0.0(0)
note
English Poetry Unit Test
Updated 1277d ago
0.0(0)
note
Characters for Trojan War
Updated 1203d ago
0.0(0)
note
lokal_at_global_na_demand
Updated 414d ago
0.0(0)

Explore top flashcards

flashcards
The Cell (A2.2)
85
Updated 186d ago
0.0(0)
flashcards
It's just a game
114
Updated 477d ago
0.0(0)
flashcards
Amendments
27
Updated 1294d ago
0.0(0)
flashcards
Civil war vocab
35
Updated 1209d ago
0.0(0)
flashcards
Egzamin Angielski wszystko
565
Updated 1168d ago
0.0(0)
flashcards
mechanical systems study guide
43
Updated 194d ago
0.0(0)
flashcards
The Cell (A2.2)
85
Updated 186d ago
0.0(0)
flashcards
It's just a game
114
Updated 477d ago
0.0(0)
flashcards
Amendments
27
Updated 1294d ago
0.0(0)
flashcards
Civil war vocab
35
Updated 1209d ago
0.0(0)
flashcards
Egzamin Angielski wszystko
565
Updated 1168d ago
0.0(0)
flashcards
mechanical systems study guide
43
Updated 194d ago
0.0(0)