/* P.120 read array data from a file */ import java.util.Scanner; class p120_Array { public static void main(String[] args) { Scanner input = new Scanner(System.in); double[] vals = new double[100]; int size = 0; while(input.hasNextDouble()) { vals[size] = input.nextDouble(); size ++; } System.out.print("size = " + size + "\n\n"); // output all elements of the array to monitor for(int i=0; i