Arrays

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

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:04 AM on 4/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

26 Terms

1
New cards

Array

A data structure that allows you to store multiple values of the same type in a single variable.

2
New cards

One single type

An array is a collection of similar types of data. It is a container that holds values of ________.

3
New cards

Fixed Size
Same Type
Indexed Access

Characteristics of Arrays

4
New cards

Fixed Size

Once declared, the size of the array cannot be changed.

5
New cards


Same Type

All elements in an array must be of the same type.

6
New cards


Indexed Access

Array elements are accessed using an index, starting at 0.

7
New cards

One-Dimensional Array
Two-Dimensional Array

Types of Arrays

8
New cards

One-Dimensional Array

Essentially a list of elements, all of the same data type, organized in a single row. Think of it as a straight line of values.

9
New cards

Stores a sequence of elements.
Accessed using a single index (starting from 0).
Ideal for linear data like scores, prices, or names

Characteristics of One-Dimensional Array

10
New cards


Two-Dimensional Array

Like a table or matrix. It consists of rows and columns, where each element is identified using two indices: one for the row and one for the column.

11
New cards

Represents data in tabular form.
Accessed using two indices: array[row][column].
Useful for data like grids, matrices, or board games (e.g., chess).

Characteristics of Two-Dimensional Array

12
New cards
dataType[] arrayName;

Syntax declaration of One-Dimensional Array

13
New cards
dataType[] [] arrayName;

Syntax declaration of Two-Dimensional Array

14
New cards

Stored in a contiguous block of memory.

Memory representation of one-dimensional array.

15
New cards

Rows stored as separate blocks, each containing elements.

Memory representation of two-dimensional array.

16
New cards

Storing a lists of items like student names or scores.

Example of one-dimensional array

17
New cards

Storing tabular data like timetable or image pixels.

Example of two-dimensional array

18
New cards

Insertion
Deletion
Searching
Sorting

What are some common operations performed on Arrays?

19
New cards

Insertion

Adding an element to the array

20
New cards


Deletion

Removing an element from the array.

21
New cards


Searching

Finding the position of an element in the array.

22
New cards


Sorting

Ordering elements in a particular order like ascending or descending.

23
New cards

Inserting Elements (changing an element by index)

You can change the value of an array element by directly assigning a new value to it using its index.

24
New cards

Searching for an Element

To find an element, you typically use a loop to check each element in the array.

25
New cards

Sorting an array

Java provides the Arrays class with a sort() method to sort arrays in ascending order.

26
New cards

You can use Arrays.copyOf() or System.arraycopy() to copy arrays in Java.

How do you copy an Array?

Explore top notes

note
Chapter 9: Chemical Equilibrium
Updated 1095d ago
0.0(0)
note
Wedding Wind
Updated 1257d ago
0.0(0)
note
College Prep Chemistry, Elements
Updated 1281d ago
0.0(0)
note
Grade 10 Biology: Lesson 9
Updated 1181d ago
0.0(0)
note
Chapter 9: Chemical Equilibrium
Updated 1095d ago
0.0(0)
note
Wedding Wind
Updated 1257d ago
0.0(0)
note
College Prep Chemistry, Elements
Updated 1281d ago
0.0(0)
note
Grade 10 Biology: Lesson 9
Updated 1181d ago
0.0(0)

Explore top flashcards

flashcards
Odyssey Test review
85
Updated 535d ago
0.0(0)
flashcards
duits kapitel 2 woordenschat
101
Updated 878d ago
0.0(0)
flashcards
US State Capitals
50
Updated 937d ago
0.0(0)
flashcards
APUSH 23-25 Simple IDs
90
Updated 60d ago
0.0(0)
flashcards
French Indefinite Articles
34
Updated 705d ago
0.0(0)
flashcards
AP Psych Unit 3
79
Updated 861d ago
0.0(0)
flashcards
Waves key words and definitions
21
Updated 476d ago
0.0(0)
flashcards
Map of East Asia- Physical map
34
Updated 428d ago
0.0(0)
flashcards
Odyssey Test review
85
Updated 535d ago
0.0(0)
flashcards
duits kapitel 2 woordenschat
101
Updated 878d ago
0.0(0)
flashcards
US State Capitals
50
Updated 937d ago
0.0(0)
flashcards
APUSH 23-25 Simple IDs
90
Updated 60d ago
0.0(0)
flashcards
French Indefinite Articles
34
Updated 705d ago
0.0(0)
flashcards
AP Psych Unit 3
79
Updated 861d ago
0.0(0)
flashcards
Waves key words and definitions
21
Updated 476d ago
0.0(0)
flashcards
Map of East Asia- Physical map
34
Updated 428d ago
0.0(0)