Back to marketplace

Unit 6 - Array

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Array

Back (Answer)

Data structure used to implement a collection or list of primitive or object reference data

#2
Front (Question)

Element

Back (Answer)

single value in an array

#3
Front (Question)

Index of an element

Back (Answer)

position of element in an array

#4
Front (Question)

1st element has an index of

Back (Answer)

0

#5
Front (Question)

Length of array

Back (Answer)

number of elements in an array is a public final data member of an array

#6
Front (Question)

Last element of an array is at index

Back (Answer)

list.length-1

#7
Front (Question)

When an array of ints is created with keyword new, each element is initialized to

Back (Answer)

0

#8
Front (Question)

Accessing an index that doesn’t exist causes an

Back (Answer)

ArrayIndexOutOfBoundsException

#9
Front (Question)

Elements of a reference type are initialized to

Back (Answer)

reference value null Objects are not automatically created

#10
Front (Question)

Elements of a double type are initialized to

Back (Answer)

0.0

#11
Front (Question)

Elements of a boolean type are initialized to

Back (Answer)

false

#12
Front (Question)

Initializer list

Back (Answer)

Used to put values into an array during initialization

#13
Front (Question)

Initialize an array of type boolean with 4 elements

Back (Answer)

boolean [ ] listOne = new boolean [4] data type [ ] name = keyword new data type [number of elements]

#14
Front (Question)

Initializer lists structure

Back (Answer)

data type [ ] name = { parameters separated by commas } Example double [ ] grades = {70.5, 88.2, 93.7, 98.7}

#15
Front (Question)

Use of array objects allows multiple related items to be represented using

Back (Answer)

a single variable

#16
Front (Question)

Square brackets are used to

Back (Answer)

access and modify an element in a 1D array using an index

#17
Front (Question)

Valid index values

Back (Answer)

0 to list.length-1

#18
Front (Question)

How to retrieve a value at index x from an array

Back (Answer)

name [index x]

#19
Front (Question)

Traversing

Back (Answer)

Access each element of an array Can be done by iteration statements

#20
Front (Question)

A for loop can also be

Back (Answer)

used to access some of elements Be sure to check LCV initialization, conditions, and increment

#21
Front (Question)

When using loops to access array elements, we need to be careful to prevent an

Back (Answer)

ArrayIndexOutOfBoundsException

#22
Front (Question)

Enhanced for loops

Back (Answer)

Also known as a for-each loop Only two components separated by a colon

#23
Front (Question)

What two components are in the parameter list of an enhanced for loop

Back (Answer)

first component -> type & name of variable that is a copy of value stored in structure second component -> data structure being traversed with the loop

#24
Front (Question)

Enhanced for loops are able to

Back (Answer)

access the value stored in variable