


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to multi-dimensional arrays, specifically 2-d arrays, also known as matrices. It covers the organization of information, memory allocation, initialization, and processing of 2-d arrays. The document also includes examples and a method to print a 2-d array in table format. Additionally, it mentions arrays with more dimensions and a programming problem related to locating stars in a digitized night sky representation.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X
String [] [] desk = new String [5][6] o Employee Time time
Emp Mon Tues Wed Thurs Fri Sat Sun
double [] [] timeCard= new double [30][7]
o Girl Scout Cookie Orders
Customer ThinMints DoSiDoes Treffoils
custTotal = for (int i = 0; i <3; i++) custTotal = cookieOrder[3][i];
Creates [2][3]
int sumMatrix (int [] [] matrix) { int sum =0;
for (int r=0; r<matrix.length;r++ for (int c=0; c < matrix[r].length;c++) sum += matrix[r][c];
return sum; }
Sample Program Stars.java