Question: the starter code is provided and the input file is also provided. IN JAVA o usages ublic static void main(String[] args) throws FileNotFoundException { I/
the starter code is provided and the input file is also provided. IN JAVA
![IN JAVA o usages ublic static void main(String[] args) throws FileNotFoundException \{](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3e1022abd5_88166f3e101a40cb.jpg)


o usages ublic static void main(String[] args) throws FileNotFoundException \{ I/ add the filename Scanner in = new Scanner(new File( pathname: "files/")); I/ declare and initialize variables if needed while(in.hasNextInt())\{ int no = in. nextInt(); II add your code here \} I/ display the results in.close(); The input file consists of a single column of int numbers. Write a program to 1. read this file 2. compute the sum and average of the even and odd numbers (separately) 3. display the results. In addition, add exception handling to the program. In your program write and use the following method: : returns true if n is even, otherwise false input: . You must download this file, save it in the files subfolder in the project folder and provide this filename to the Scanner in the starter code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
