fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10.  
  11. public static int getNumber() {
  12. System.out.println("Checkpoint No 0");
  13. try {
  14. System.out.println("Checkpoint No 1");
  15. return 7;
  16. } finally {
  17. System.out.println("Checkpoint No 3");
  18. return 43;
  19. }
  20. }
  21. public static void main (String[] args) throws java.lang.Exception
  22. {
  23. System.out.println(Ideone.getNumber());
  24. }
  25. }
Success #stdin #stdout 0.1s 320320KB
stdin
Standard input is empty
stdout
Checkpoint No 0
Checkpoint No 1
Checkpoint No 3
43