fork download
  1. class StackTest{
  2. public static void main(String[] args){
  3. show();
  4. System.out.println("back in main");
  5. display();
  6. }
  7. static void show(){
  8. try{
  9. show();
  10. }catch(StackOverflowError e){
  11. System.out.println("error caught");
  12. }
  13. }
  14. static void display(){
  15. System.out.println("after show");
  16. }
  17. }
Success #stdin #stdout 0.1s 213440KB
stdin
Standard input is empty
stdout
error caught
back in main
after show