Overview
The program requires 14 integer values in total:- 7 integers for the first array
- 7 integers for the second array
Input Prompts
When you run the program, you’ll see the following prompts fromMain.java:14-26:
First Array Input
Second Array Input
Input Requirements
The program uses
Scanner.nextInt() to read values, which only accepts integer values (whole numbers).Valid Input
- Positive integers:
1,42,1000 - Negative integers:
-5,-100,-23 - Zero:
0
Invalid Input
Example Input Session
Here’s a complete example of entering values:How Input is Processed
The program processes your input as follows:Read first array values
The program reads 7 integers into
array1 using a loop (Main.java:15-19).Each value is added to sumaTotal for later average calculation.Read second array values
The program reads 7 integers into
array2 using another loop (Main.java:22-26).