Question: This is for Intermediate Java Programming Program 1: Write a program that uses an ArrayList filled with a minimum of 10 Strings. Use a 'for-each'

This is for Intermediate Java Programming

Program 1: Write a program that uses an ArrayList filled with a minimum of 10 Strings. Use a 'for-each' loop to print the ArrayList collection. Then ask a user which element they would like to see again. Then, attempt printing the element in a try/catch format which will result in the element being displayed. If the element value received is invalid, display a message that an Exception has been thrown displaying "Out of Bounds". In this program, include the use of Autoboxing/Auto-Unboxing, working with a user String input.

Program 2: Write a program to create a new file titled data.file, if the file does not exist. Then write to the new file, adding 10 randomly generated numbers, or append 10 randomly generated numbers to a previous file. Each integer is to be separated by a space. Close the file, then reopen the file and read the data from the file and display it.

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!