import; import; import;




import java.util.ArrayList; 

public class Ex02 { 

   public static void main(String[] args) throws IOException { 

       BufferedReader userInput = new BufferedReader 

           (new InputStreamReader(;

       ArrayList<String myArr = new ArrayList<String();








Starting with this provided code, add the following functionality:

1.   Use a Try/Catch block so that the exception is caught and the program exits a bit more gracefully. Save this file as (Be sure to rename the Public Class accordingly.)

Starting with the provided code again (without the Try/Catch block), fix the code so that it runs correctly. That is to say, it should display the last item in the ArrayList. Save this file as
Powered by