Is is common knowledge that people are quite often incompetent, and will provide wonderful software with the incorrect input. For example, if a program expects to find a list of integers on its command line, they will regularly give words like "cat" instead.
Write a program that expects to find a list of integers on its command line, and is robust against incorrect user input. Each correct integer found must be wrapped in an Integer object, and a ArrayList must be used to store the objects. After all the (correct integer) command line arguments have been stored in the ArrayList, the contents of the ArrayList must be output.
The program must:
Converter method says integer OK - 12 Converter method says integer OK - 23 Catch block says the argument "cat" is ignored because cat Converter method says integer OK - 34 Converter method says integer OK - 45 Catch block says the argument "dog" is ignored because dog Converter method says integer OK - 56 Converter method says integer OK - 67 The ArrayList contents are: Item 0 is 12 Item 1 is 23 Item 2 is 34 Item 3 is 45 Item 4 is 56 Item 5 is 67