 Welcome to Intro to AP Computer Science for new AP teachers. This topic is basically the last one, at least in this video series, is 2D arrays, at least one of the main topics. Let's go ahead and take a look. So we'll take a look at what is a 2D array. Again, this assumes that you know what an array is. So basically it's an array of arrays. And we'll talk about how to create a 2D array, accessing and modifying 2D array elements. And we use the row and the column and how to traverse a 2D array. It's pretty simple. Enhanced for loops doing the same thing, that's actually a little bit more complicated. And then some algorithms, again just talking about those same algorithms from before and what students might need to do. And then a little quick introductory exercise to cap that off. So a 2D array is an ordered data structure that has rows and columns. So I usually think of a spreadsheet. So you have a row, a column, and there's data in each of those cells. So it holds one type of data, it can hold primitives and reference types, which are objects. It is fixed in size. So just like a regular array, the size is fixed. So when you create the size, you've got to know how many cells you need. And it is randomly accessible through two indices, in this case, row and column. You can think of it as x and y, but the order would be different, y comma x, that kind of confuses people. So I stick with row and columns called row major order. So to create a 2D array, it's very similar to creating a 1D array because everything's doubled. So you'll see type, square brackets, square brackets, name equals new, type, and then the number of rows and the number of columns. So for example, int square brackets, square brackets, scores equals new int 3, 3. So in this case, there are nine elements because we have three rows times three columns. Top left element is index 0, 0, and the bottom right element is index 2, 2, because we don't get the three, it's 0, 1, 2. And of course, the default value for an array of integers is 0. So we can also create arrays that are pre-populated with values. So for example, we have a little number grid here. And this is also a 3 by 3 grid. So here is our first array, 1, 2, 3 comma, our second array, 4, 5, 6, and our third array, 7, 8, 9. So this is the values based on what we have here is what we would see in this, be like a number pad, for example. You can see, so this is a row, this is a row, this is a row, 1, 4, 7, so column 0, column 0, column 0, column 1, column 1, column 1, column 2, column 2, column 2, row 0, row 1, row 2. Very simple. Accessing and modifying array elements. To access and modify array elements, we need the index of the row and column. So very similar to one-day arrays. So value equals name, square bracket row, square brackets column, modify, that's the exact op, yeah, reverse that, name row and column equals value. For the first thing, in this case, we need a nested loop. So you can see here. So for int row equals 0, actually that's wrong, I should, I should fix that. I'm running out of time, so I don't have time to do it right now, I guess I'll redo it, bye.