ArrayListTest5 - ArrayList<Integer> a = new...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.ArrayList; import java.util.Iterator; import java.util.Random; i public class ArrayListTest5 { public static void main (String [] arg) { final int MAXELTS = 20; Random generator = new Random();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ArrayList<Integer> a = new ArrayList<Integer>(); for(int k = 0; k < MAXELTS; k++) { a.add(generator.nextInt(100) + 1); } System.out.println(a); } }...
View Full Document

This note was uploaded on 06/07/2010 for the course CS 201 taught by Professor Staff during the Spring '08 term at Iona.

Ask a homework question - tutors are online