1/45
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Array
A fundamental data structure in Java.
Array
Allows you to store a collection of elements of the same type.
Array
Provides a convenient way to organize and manipulate data.
Array
Stores data as a contiguous block of memory.
One Dimensional Array
A data structure that allows you to store multiple elements of the same type.
One Dimensional Array
Stores elements in a contiguous block of memory.
One Dimensional Array
The simplest form of array.
One Dimensional Array
Provides a convenient way to store and manipulate collections of data.
int[] variable = new int[];
Syntax of an array declaration
Value
The data stored inside an array element.
Index Number
The position of an element inside an array.
Arrays
Used to store many values in one variable.
Arrays
Used to keep data organized.
Arrays
Used to make it easy to loop and process data.
Array Declaration
What do you call this: int[] numbers = new int[5];
Array Initialization
What do you call this: int[] numbers = {1, 2, 3, 4, 5};
Accessing Array Values
Retrieving values stored inside an array.
Accessing Array Values
Uses the index number to get a specific value.
Index
The position of a value in an array.
Index
Always starts from 0.
Using Array with Loop
A method used to process array elements repeatedly.
Using Array with Loop
Allows accessing each element of the array one by one.
Using Array with Loop
Commonly used to display or modify array values.
Using Array with Loop
Helps reduce repetitive code.
Using Array with Loop
Can be done using iterative structures.
One Dimensional Array
Two Dimensional Array
Multi Dimensional Array
These are the three types of Array.
Multi Dimensional Array
An array that contains multiple rows and columns.
Multi Dimensional Array
Forms a grid-like structure.
Multi Dimensional Array
Used to store and manipulate data in tabular format.
Multi-Dimensional Arrays
declaring the array and specifying its dimensions.
Two-Dimensional Array
The most common type of multi-dimensional array.
Two-Dimensional Array
Represents a grid with rows and columns.
Two-Dimensional Array Declaration Syntax
type[][] arrayName = new type[rowSize][columnSize];Row, Column
What is declared inside the closed brackets in an Array Declaration?data type[][] variable = new data type[][]
10, 20, 30, 40What is the output?

Score: 85
Score: 90
Score: 78
Score: 88What is the output?

Total = 50What is the output?

Highest number = 45What is the output?

Lyca
Kayne
Dbezt
WencyWhat is the output?

import java.util.Arrays;
The statement that allows a Java program to use the static methods of the built-in Arrays utility class without needing to specify its full package name every time a method is called.
sort()
Sorts an array into ascending order.
variable.length
It is a built-in function in the Array class that gives total number of elements in the array. The . calls the member that does this function in the Array class.
Array Traversal
It is done to access each elements in the array one by one; always done using loop structures.
Apple
Banana
Orange
Mango
Grapes
PineappleWhat is the output?

1 2 3
4 5 6
7 8 9 What is the output?

Apple Banana Orange
Mango Grapes Pineapple