It's part of a school lab and I've researched and I can't find anything to accomplish this task. I'm reading in lines from a file using FileReader and BufferedReader. The data in the file is a name and an age in the following format:
John doe 20
Jane doe 30
etc. I already have code that will take each line and split as such: split[0] = {"John", "doe", "20"}
I need to get the "20" and store in an array of doubles such as double[0] = 20;
The reason it has to be a double and not Double is because that part of the code in the assignment is already written and I'm sure I cannot just decide to change everything and use a Double instead. How can I do this? Thank you in advance!