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 

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

1 Expert Approved Answer
Step: 1 Unlock

import javautil public class FruitEx public sta... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!