A good answer might be:

Either order is correct.

Neither is more specific than the other, so they can appear in either order.


Possibly Incorrect Program

Here is a possibly incorrect program:

import java.lang.* ;
import java.io.* ;

public class DivisionPractice
{
  public static void main ( String[] a ) throws IOException
  {
    BufferedReader stdin = 
        new BufferedReader ( new InputStreamReader( System.in ) ); 
    String inData;
    int    num=0, div=0 ;

    try
    {
      System.out.println("Enter the numerator:");
      inData = stdin.readLine();
      num    = Integer.parseInt( inData );
      System.out.println("Enter the divisor:");
      inData = stdin.readLine();
      div    = Integer.parseInt( inData );

      System.out.println( num + " / " + div + " is " + (num/div) );
    }

    catch (NumberFormatException ex )
    {
      System.out.println("You entered bad data." );
      System.out.println("Run the program again." );
    }

    catch (ArithmeticException ex )
    {
      System.out.println("You can't divide " + num + " by " + div);
    }
  }
}

QUESTION 12:

Is the program correct? Are the catch{} blocks in a correct order?