// // P.67 // import java.util.Scanner; public class TestArray2 { public static void main(String[] args) { Scanner input= new Scanner(System.in); final int MAX = 100; double[] vals = new double[MAX]; int i = 0; // index of array --> size of file while(input.hasNextDouble()) { double item = input.nextDouble(); vals[i] = item; i++; } System.out.println("size = " + i); System.out.println("\n\nDone.\n\n"); } } /* Q1: Declare an array that can store 15 names. String[] names = new String[15]; Q2: The file is as following (number of names < 15): Joe Smith Gorge Bush ... Bruse Lee Quit Write the statements to read the names from the above file and store to the array names[], output the size to the monitor. */