A good answer might be:

The program can add up however many integers there are in the file, not a hard-wired number of integers like the previous program.

Near-complete Program

Here is the program, except for a blank or two:
import java.io.*;
class AddUpAll
{
  public static void main ( String[] args ) throws IOException
  {
    int value;          // the value of the current integer
    int limit;          // the number of integers to add up
    int sum = ________; // initialize sum

    String line;
    BufferedReader stdin = new BufferedReader( 
        new InputStreamReader( System.in ) );

    // get the number of integers to add up
    System.out.println("Enter how many integers:");
    line   = stdin.readLine();
    limit  = Integer.parseInt( line.trim() );

    int count = ________;   // initialize count

    while ( count <= _______ )
    {
      System.out.println("Enter a number:");
      line   = stdin.readLine();
      value  = Integer.parseInt( line.trim() );
      sum    = ____________;   // add to the sum
      count  = ____________;   // increment count
    }

    System.out.println( "Grand Total: " + sum );
  }
}

QUESTION 4:

Fill in the blanks.

Click Here after you have answered the question