Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

57. ArrayList Example

Getting Started with Java

Woah, wait a second..

This is a 100% free course, but we need you to first join or login to watch this video.

Alright, join or login here.

This video shows an example of ArrayList in Java. We first see how to use an ArrayList with a for each loop and then use a JOptionPane.showInputDialog() to take user input to enter a bunch of numbers. We store these numbers in an ArrayList capable of storing only Integer values and then find the minimum, maximum and average of these numbers. We finally display the results to the user using the JOptionPane.showMessageDialog() method.

Course Cirriculum