ArrayTester1 - { System.out.print ("Enter...

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

View Full Document Right Arrow Icon
//Fill array from the console. We know exactly how many numbers to fill //it with. / import java.util.Scanner; i public class ArrayTester1 { public static void main (String [] args) { int[] numArray = new int[10]; i Scanner in = new Scanner(; S for (int i = 0; i < numArray.length; i++)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { System.out.print (&quot;Enter number &quot; + i + &quot; : &quot;); numArray[i] = in.nextInt(); } System.out.println (&quot;There are &quot; + numArray.length + &quot; numbers in the array&quot;); a for (int i = 0; i &lt; numArray.length; i++) System.out.print(numArray[i] + &quot; &quot;); } }...
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