Question: Java Help: Ask the user for a filename. In binary format, read all the integers in that file. Show the number of integers you read
Java Help: Ask the user for a filename. In binary format, read all the integers in that file. Show the number of integers you read in, along with the maximum and minimum integer found.
I don't have access to the n1.dat files, but I suppose you use fileinputstream, try catch and Boolean /while to read the data in binary format
Required Output:
Enter a filename
n1.datENTER
Found 50 integers.
Max: 9944
Min: 74
Enter a filename
n2.datENTER
Found 60 integers.
Max: 9977
Min: 7
Enter a filename
n3.datENTER
Found 70 integers.
Max: 9532
Min: 134
Enter a filename
n4.datENTER
Found 80 integers.
Max: 9925
Min: 124
Enter a filename
n5.datENTER
Found 926 integers.
Max: 9987
Min: 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
