Question: Each Question carries five Marks 1. Write a java program to do the following: a) Create an ArrayList named fruits b) Add the elements Banana,
Each Question carries five Marks 1. Write a java program to do the following: a) Create an ArrayList named fruits b) Add the elements Banana, Apple, Orange, and Grape to the frui ArrayList. c) Use for loop to display the values in the fruit list as following: Banana Apple Orange Grape d) Sort the list then print it again without loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
