IB Computer Science | Year 2 (Senior) · 2D Arrays in Java · part 1/8
2D Arrays in Java: Rows & Columns

IB Computer Science B2.2, 2D arrays in Java: rows, columns and indexes (part 1 of 8, for SL and HL). What a 2D array is in Java, how to create one, and how to read and change one element. With a 5-mark exam question solved step by step.
In this lesson
- 0:00 Intro
- 0:17 Exam question
- 0:39 Warm-up
- 1:21 Rows and columns
- 2:28 Creating a 2D array
- 3:37 Read and change
- 4:22 Tracing practice
- 5:53 What earns the mark
- 6:26 Exam question solved
- 7:20 Recap
Answers to the practice questions at the end of the video
- double[][] temps = new double[7][24];
- 7 (1 + 6).
- m has only rows 0 and 1, so there is no row 2 [1]; the index is out of bounds and the program stops with a run-time error [1].
Questions are original, in the style of the exam; marks are estimates.
New IB lessons every day. Subscribe to TheIBAxolotl so the next part shows up in your feed.