Question: Write a program that 1) Reads two integer numbers from a file with a directory C:UsersJava umbers.txt 2) Find the minimum of the two numbers
Write a program that
1) Reads two integer numbers from a file with a directory C:\Users\Java umbers.txt
2) Find the minimum of the two numbers (use min() method)
3) Create a new file with a directory C:\Users\Java\min.txt and saves the numbers and minimum it.
--------------------------------------------------------------------------------------------
Sample Input File:
num1 5.5
num2 9.6
-------------------------------------------------------------------------------------------
Sample Output File:
numbers: 5.5 and 9.6
minimum: 5.05
-------------------------------------------------------------------------------------------
Use the following body of code for your answer:
import java.io.*;
import java.util.*;
public class Q2{
public static void main(String[] args) throws FileNotFoundException
{
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
