Question: Write a program that does the following: 1) Create an ArrayList to hold Strings 2) Using a loop, input individual names from a textfile called

 Write a program that does the following: 1) Create an ArrayList

Write a program that does the following: 1) Create an ArrayList to hold Strings 2) Using a loop, input individual names from a textfile called students.txt and add them to the ArrayList. (Read in both names as a single String.) Assume you do not know how many names are in the file. a) Example file contents looks like Smith, Mary Jones, Samuel 3) After you have read all of the data in the file a) b) Second use a While Loop to read all the names from the ArrayList and print out all the names c) See example list for formatting First use a While Loop to read all the names from the ArrayList and print out all the names whose first letter of their last name falls in the range A-L. (Indent the name) whose first letter of their last name falls in the range M-Z (Indent the name)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!