Write/Read the file 4A.Write to file Write the code to do the following: -Display message to ask
Question:
Write/Read the file
4A.Write to file
Write the code to do the following:
-Display message to ask then read input from the keyboardabout the following information:
* accountNumber (string)
* customerName (string)
* balance (float)
-open output filecustomer.txt to write:
-Write to the output file customer.txt the following information that have read input from the keyboard in the following format:
accountNumber - customerName - balance
For example:
1561163623- Luis Martinez - 2845.25
-close file
4B - Read from the file
Open notepad, type the following lines with the file name as data.txt
1112243433 - Mary Lane - 1250.366
2123312344 - John Smith - 2134.25
1561175753 - James Smith - 1255.25
-provide the Java code to open file data.txtto read
-Use the loop to read file
-Read each line of the file then display on screen
-continue reading and displaying on the screen all the lines until end of the file
-Write: "End of the file data.txt" on the screen
-close data.txt file