FileDocCategorySizeDatePackage
ArrayDemo.javaAPI DocExample431Tue Dec 12 18:58:06 GMT 2000None

ArrayDemo

public class ArrayDemo extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        int[] anArray;	        // declare an array of integers

        anArray = new int[10];	// create an array of integers

        // assign a value to each array element and print 
        for (int i = 0; i < anArray.length; i++) {
            anArray[i] = i;
            System.out.print(anArray[i] + " ");
        }
        System.out.println();