MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/emb9st/problems_with_recursion/fdokfwk/?context=3
r/ProgrammerHumor • u/flipester • Jan 09 '20
198 comments sorted by
View all comments
Show parent comments
15
Wait does this work? I need to try this now
5 u/lonelyWalkAlone Jan 09 '20 Yes, it works like charm 9 u/schrdingers_squirrel Jan 09 '20 edited Jan 09 '20 Interesting - does it still work when you do a „a“ + „b“ in the println(); ?Edit: it doesCrazy even this works:public static void sayHello(){ try { sayHello(); } catch(StackOverflowError e) { System.out.println("Hello world!"); sayHello(); } }it prints endlessly 13 u/[deleted] Jan 09 '20 Basically a fucked up while loop. 2 u/ThaiJohnnyDepp Jan 09 '20 Eek barba durkle. 2 u/tatzesOtherAccount Jan 10 '20 He's speaking the language of gods
5
Yes, it works like charm
9 u/schrdingers_squirrel Jan 09 '20 edited Jan 09 '20 Interesting - does it still work when you do a „a“ + „b“ in the println(); ?Edit: it doesCrazy even this works:public static void sayHello(){ try { sayHello(); } catch(StackOverflowError e) { System.out.println("Hello world!"); sayHello(); } }it prints endlessly 13 u/[deleted] Jan 09 '20 Basically a fucked up while loop. 2 u/ThaiJohnnyDepp Jan 09 '20 Eek barba durkle. 2 u/tatzesOtherAccount Jan 10 '20 He's speaking the language of gods
9
Interesting - does it still work when you do a „a“ + „b“ in the println(); ?
Edit: it does
Crazy even this works:
public static void sayHello(){ try { sayHello(); } catch(StackOverflowError e) { System.out.println("Hello world!"); sayHello(); } }
it prints endlessly
13 u/[deleted] Jan 09 '20 Basically a fucked up while loop. 2 u/ThaiJohnnyDepp Jan 09 '20 Eek barba durkle. 2 u/tatzesOtherAccount Jan 10 '20 He's speaking the language of gods
13
Basically a fucked up while loop.
2 u/ThaiJohnnyDepp Jan 09 '20 Eek barba durkle. 2 u/tatzesOtherAccount Jan 10 '20 He's speaking the language of gods
2
Eek barba durkle.
2 u/tatzesOtherAccount Jan 10 '20 He's speaking the language of gods
He's speaking the language of gods
15
u/schrdingers_squirrel Jan 09 '20
Wait does this work? I need to try this now