age: JAVA Fill in the code in the following program that reads integer values from a file named input.txt as input and outputs the minimum value of all the input values. import java.util.Scanner; import java.io.File; import java.io.IOExcepton public class MinimumValue { public static void main (String[] args) throws IOException{
HELP NEEDED ASAP!
Language: JAVA
Fill in the code in the following program that reads integer values from a file named input.txt as input and outputs the minimum value of all the input values.
import java.util.Scanner;
import java.io.File;
import java.io.IOExcepton
public class MinimumValue {
public static void main (String[] args) throws IOException{
File file = _____ File("input.txt");
Scanner s = _____ Scanner(_____); //instantiate a Scanner object
int minimum; // declare the variable that will hold minimum value
int number; // declare the variable to hold input value
if(____________)
{
System.out.println("No integer value in the file");
}
else
{
minimum = _____________; // initialize minimum with first read
while(_____________){
number = _____________; // read next integer
if(____________)
_____________;
}
System.out.println("The minimum value is " + ___________);
}
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps