Multidimensional Array

advertisement
MULTIDIMENSIONAL
ARRAYS
Declaring arrays
• The int array b for row 0 is a 1D array with 2 elements (1 and 2)
• The int array b for row 1 is a 1D array with 3 elements (3, 4 and 5)
Write a program to display the following
output
Array_exe1.java
Output
Exercise
Exercise07_01.java
• Modify the program by adding the following methods:
a. Method for summing all elements
b. Method for printing array
Sample Output
Download