Question
Write a Java code that does the following:ArrayList:*Note: Contrary to Arrays that are fixed in size, an ArrayList grows its size automatically when new elements
Write a Java code that does the following:ArrayList:*Note: Contrary to Arrays that are fixed in size, an ArrayList grows its size automatically when new elements are added to it.a. Create ArrayList of employee objects. (use the same class as you built in the lab assignment).b. Use for loop to add five employee objects in the ArralyList.c. Use for loop to search for employee object named "Ali". If found exit and print"employee with name Ali found in the array list, otherwise print "employee with name Alinot found!".d. Use for loop to remove any employee object (element) with salary < 5000 SR.e. Use for loop to print the info details of all employee objects using get( ) method thatreturns an element in the array.
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