Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Create an ArrayList with five (5) String objects holding anime/cartoon characters. 2. Display the content of your created ArrayList. 3. Ask the user
1. Create an ArrayList with five (5) String objects holding anime/cartoon characters. 2. Display the content of your created ArrayList. 3. Ask the user to select a number between 0 to 4. 4. Display the anime/cartoon character based on the user's entered number. 5. Catch the potential exception thrown (IndexOutOfBoundsException) if the user enters a number that is out of range. Sample output: [Luffy, Nami, Sanji, Zoro, Brook] Choose a number between 0 to 4:5 Invalid input. This program has been terminated. Grading rubric Completeness - 10 points Accuracy - 10 points
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started