fork download
  1. class Ideone
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. System.out.println(foo());
  6. }
  7.  
  8. public static int foo(){
  9. try{
  10. return 5;
  11. }finally{
  12. return 42;
  13. }
  14. }
  15. }
Success #stdin #stdout 0.06s 32540KB
stdin
Standard input is empty
stdout
42