I apologize in advance if this question seems too silly or basic. But Google searches did not get me anywhere with this.

The code is simple:

```
public class Average3 {
  public static void main(String[] args) {
    try {

      printAverage(100, 0);

    } catch (ArithmeticException ae) {

      ae.printStackTrace(); 

      System.out.println("Exception handled in " +
      "main().");

    }
    System.out.println("Exit main().");

  }

  public static void printAverage(int totalSum, int totalNumber) {
    try {

      int average = computeAverage(totalSum, totalNumber);// (8)
      System.out.println("Average = " +

          totalSum + " / " + totalNumber + " = " + average);
    } catch (IllegalArgumentException iae) {

      iae.printStackTrace();

      System.out.println("Exception handled in " +
      "printAverage().");           
    }
    System.out.println("Exit printAverage().");

  }
  public static int computeAverage(int sum, int number) {
    System.out.println("Computing average.");

    return sum/number;

  }
}

```

Output:

```
Computing average.
java.lang.ArithmeticException: / by zero
        at Average3.computeAverage(Average3.java:30)
        at Average3.printAverage(Average3.java:17)
at Average3.main(Average3.java:6)
Exception handled in main().
Exit main().

```

Here I was expecting IllegalArgumentException since the division by 0 happens in computeAverage which is called by printAverage. In my mind, the try statement should skip and it should move to the catch at this point registering an IllegalArgumentException.

I actually have a cloudy understanding but I want to know exactly what is going on and why. I've been racking my brains on this.

Thanks for helping.