Question
This lab is about learning the difference between ArrayLists and Arrays. You may use whatever programming environment you want to use. Just remember to submit
This lab is about learning the difference between ArrayLists and Arrays.
You may use whatever programming environment you want to use.
Just remember to submit only the .java file.
Program Requirements
Do the following requirements using an array of size 10.
Perform the steps below, once using and array, and again using an arraylist.
Print out the array/arraylist after initializing it with values (a Before picture).
After performing the following logic associated with each step below, print out the array/arraylist again (an After Picture).
Steps to be done for both an Array and an ArrayList
Load the following values into the Array/ArrayList (in the order specified): Hoskins, Franco, Hicks, Foles, Emib, Reddeck, Giroux, Couturier.
Switch the first two entries.
Search for the name Foles and replace it with Wentz.
Search for the name Hoskins. If found, change it to Rhys Hoskins (make sure to include the space).
Remove Hicks and slide the names that were after Hicks down 1 spot. Remember, the name Hicks can be anywhere in the array/arraylist.
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