Two-Dimensional Arrays
Take your understanding of arrays and loops to the next dimension! Learn how to create and use two-dimensional arrays.
StartKey Concepts
Review core concepts you need to learn to master this subject
Nested Iteration Statements
Declaring 2D Arrays
Accessing 2D Array Elements
Initializer Lists
Modify 2D Array Elements
Row-Major Order
Column-Major Order
Traversing With Enhanced For Loops
Nested Iteration Statements
Nested Iteration Statements
for(int outer = 0; outer < 3; outer++){
System.out.println("The outer index is: " + outer);
for(int inner = 0; inner < 4; inner++){
System.out.println("\tThe inner index is: " + inner);
}
}
In Java, nested iteration statements are iteration statements that appear in the body of another iteration statement. When a loop is nested inside another loop, the inner loop must complete all its iterations before the outer loop can continue.
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory