I'm having trouble with my code.
I have a text file with the following input
99.99 67 178843.00
87.4 3 8983.00
how do i read these input and store them in separate variables?
this is the code that i have:-
Scanner inputFile = new Scanner(myFile);
interest = inputFile.nextDouble();
years = inputFile.nextInt();
amount = inputFile.nextDouble();
System.out.println("The monthly payment is: " + money.format(bank.getMonthlyPayment()));
System.out.println("The total payment is: " + money.format(bank.getTotalPayment()));