fork download
  1. public class Main {
  2. public static void main(String[] args) {
  3. int total = 5;
  4. try {
  5. call();
  6. } catch (ArithmeticException e) {
  7. total += 10;
  8. } catch (Exception e) {
  9. total += 20;
  10. } finally {
  11. total += 100;
  12. }
  13. System.out.print(total);
  14. }
  15.  
  16. static void call() throws Exception {
  17. throw new ArithmeticException();
  18. }
  19. }
Success #stdin #stdout 0.09s 52580KB
stdin
Standard input is empty
stdout
115