Question: Write a complete Java program to do the following: Declare an array named numArray2D as a two-dimensional array of int values with four rows and
- Write a complete Java program to do the following:
- Declare an array named numArray2D as a two-dimensional array of int values with four rows and three columns.
- Fill the array with data read from the text file 2DArrayData.txt. The first three items in the file will be used to fill the first row of the array, the second three for the second row, the next three for the third row, and the last three for the fourth row.
- Print the contents of the array in table format with four rows and three columns.
- Calculate the average value of the numbers stored in the array.
- Print out all values in the array that are greater than the average.
Output of program:
25 10 14
4 5 3
9 8 15
17 12 20
average = 11.833333333333334
Array values greater than average:
25 14 15 17 12 20
Contents of 2DArrayData.txt
25
10
14
4
5
3
9
8
15
17
12
20
Step by Step Solution
There are 3 Steps involved in it
To address the task of writing a complete Java program as specified Ive noted that the initial answer outlines the general steps correctly but lacks s... View full answer
Get step-by-step solutions from verified subject matter experts
