Java Exercise 8 / 15

ArrayList and Collections

Medium 20 points

Create an ArrayList of fruits and add 3 fruits, then display them.

ArrayList is a dynamic collection. ArrayList<String> list = new ArrayList<>(); creates a list. add() adds an element.

Well done! 🎉
Your answer is correct! You earned 20 points.
Your code Java
Result