Previous    Next    Home    Source Code    Package
  1. Custom exceptions can be used to control execution. In this first example we escape a pending (expensive) multiplication of numbers if a 0 is discovered.
  2. In the long JTextField enter some numbers separated by blanks then press return. The number of multiplications performed is indicated in the short JTextField and the product is shown in the long one.