Question: Write a java program to do the following: 1) Create an ArrayList of fruit 2) Add the elements Banana, Apple, Orange, and Grape to
Write a java program to do the following: 1) Create an ArrayList of fruit 2) Add the elements Banana, Apple, Orange, and Grape to the fruit list. 3) Use for loop to display the values in the fruit list: 4) Sort the list then print it again without loop.
Step by Step Solution
3.46 Rating (146 Votes )
There are 3 Steps involved in it
import javautil public class FruitEx public sta... View full answer
Get step-by-step solutions from verified subject matter experts
