Using Java Problem 1 Arraylists Create Class Practice Arraylists Call Class Presidentsaa S Q37266132

USING JAVA

  1. Problem #1:(ArrayLists) Create a Class to practicewith ArrayLists. Call your class “PresidentsAA”, and storeit in a file called “PresidentsAA.java”. In this class include justa no-args constructor. Have main start things out by instantiatingthe class and calling the no-args constructor. In the no-argsconstructor, first Create an ArrayList for Strings. Fill this listwith the names of the first 10 presidents of the U.S. Then ask theuser for input. Ask the User which number president that they wantto see. If they enter a 3, that means they want to see the name ofthe 3rd U.S. president. Your code should print out“Thomas Jefferson”.
  1. Problem
    OR
    OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.