Source code for IntArrayExample.java:

public class IntArrayExample
{
	public static void main(String args[])
	{
		// IntArrayExample
		int firstArray[];
		int secondArray[] = new int[10];
		int thirdArray[] = {10, 12, -10, 100};
		System.out.println(thirdArray[0]);
		System.out.println(thirdArray[1]);
		System.out.println(thirdArray[2]);
		System.out.println(thirdArray[3]);
	}
}

Output from IntArrayExample.java:

10 12 -10 100

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the IntArrayExample application at the momement. You need to compile and run the source code first.

To run this program:


Authors: Kevin Chu and Eric Brower
Copyright 2000 Prentice Hall PTR