Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- class retArrExample {
- retArrExample() {
- //declare & initialize array
- int numOfTutors=4;
- int numOfDays=3;
- new int [numOfTutors][numOfDays] tutorData;
- int[][] tutorData = { {25,3,0}, {14, 5, 12},{33, 22, 10},{0,20,5}};
- for (int i = 0; i < tutorData.length; i++) {
- // The inner loop executes as long as there are elements in row i
- for (int j = 0; j < tutorData[i].length; j++){
- System.out.print(tutorData[i][j] + " ");
- }
- System.out.println();
- }
- System.out.println();
Advertisement
Add Comment
Please, Sign In to add comment