Question: Using Java: Problem #1: (ArrayLists) Create a Class to practice with ArrayLists. Call your class PresidentsAA, and store it in a file called PresidentsAA.java. In

Using Java:

Problem #1: (ArrayLists) Create a Class to practice with ArrayLists. Call your class PresidentsAA, and store it in a file called PresidentsAA.java. In this class include just a no-args constructor. Have main start things out by instantiating the class and calling the no-args constructor. In the no-args constructor, first Create an ArrayList for Strings. Fill this list with the names of the first 10 presidents of the U.S. Then ask the user for input. Ask the User which number president that they want to see. If they enter a 3, that means they want to see the name of the 3rd U.S. president. Your code should print out Thomas Jefferson.

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!