Question: Write a method called writeNames that takes two parameters an array of Strings (nameArray) and a String (fileName), and returns nothing. Write the array of

Write a method called writeNames that takes two parameters an array of Strings (nameArray) and a String (fileName), and returns nothing. Write the array of Strings (names) to a text file named using the fileName parameter. Make sure to catch any Exception that might be thrown. Write a method called readNames that takes a String parameter (fileName) and returns an Array ist of Strings (nameArrayList). The method reads the text file (fileName) and populates the ArrayList with an element for each line in the file. The method returns the populated ArrayList. Make sure to catch any Exception that might be thrown
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
