Question: ArrayList named as taskList to hold some tasks. Ask user for three tasks and save them in taskList. Print the size of the taskList and
ArrayList named as taskList to hold some tasks. Ask user for three tasks and save them in taskList. Print the size of the taskList and then display each item with its index of this taskList. Sample output of the program follows: Program Output: Your Task List has 3 tasks stored in it. 1: Wake up early 2: Eat healthy breakfast 3: Goto sleep early Now remove the item at index 2 and display the remaining taskList items and their indices. Now insert 'Eat Lunch' at index 2 and 'jog 3 Kms' at index 3 and display the updated nameList with indices again.
Step by Step Solution
There are 3 Steps involved in it
Java import javautilArrayList import javautilScanner public class TaskList public static void mainSt... View full answer
Get step-by-step solutions from verified subject matter experts
