Implement the readAndDiscardLineNumbers
method that reads a file produced by the preceding problem, removes the line numbers, and returns an array list of the lines.
Your method should not throw a checked exception. If there is anything wrong with the input file (i.e., it does not exist, or the format of the content is not right), throw an IllegalArgumentException
. If you are catching an IOException
(which you must, or your program won't compile), set it as the cause of the exception that you do throw.