I had created a 2-dimensional array in Java and I was looking for a way to print it out on the console so that I could confirm that the stuff I was making was correct. I found some code online that performed this task for me, but I had a question about what a particular bit of the code meant.
int n = 10;
int[][] Grid = new int[n][n];
//some code dealing with populating Grid
void PrintGrid() {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
System.out.print(Grid[i][j] + " ");
}
System.out.print("\n");
}
}
What does "\n" do? I tried searching on Google, but since it's such a small bit of code I couldn't find much.