{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ArrayTester1

ArrayTester1 - System.out.print"Enter number"...

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(System.in); 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 ("Enter number " + i + " : "); numArray[i] = in.nextInt(); } System.out.println ("There are " + numArray.length + " numbers in the array"); a for (int i = 0; i < numArray.length; i++) System.out.print(numArray[i] + " "); } }...
View Full Document

{[ snackBarMessage ]}