Write a program to accept a sentence from the keyboard terminated by a new line. Use the Integer class’s parseInt method to locate all the integers. Then, write them to the disk file numbers.txt...


Write a program to accept a sentence from the keyboard terminated by a new line. Use the Integer class’s parseInt method to locate all the integers. Then, write them to the disk file numbers.txt (don’t specify a path) one number per line in the order in which they appear in the sentence. After storing the integers in the disk file, ask the user which of the numbers to delete from the file via an invocation of the inputInt method described in When the method throws an exception, the application should tell the program user which mistake (no-entry or non-integer entry) occurred and ask for another entry. Before terminating, the application should read the modified contents from the file and output them to the system console.

Nov 18, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here