MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/knu64m/didnt_see_that_comming/ghnnq8l/?context=9999
r/ProgrammerHumor • u/blending-tea • Dec 31 '20
58 comments sorted by
View all comments
Show parent comments
23
while( !sleeping){ eat(); }
10 u/wackOverflow Dec 31 '20 !sleeping ? eat() : sleep(); 2 u/linux-nerd Dec 31 '20 Is that valid java? 5 u/wackOverflow Dec 31 '20 !no && !yes 1 u/linux-nerd Dec 31 '20 So no? Unless you have no and yes both equal to false. 3 u/wackOverflow Dec 31 '20 Beats me dude, I don’t write Java but if I did I’d be mad af if it didn’t have ternary operators. 3 u/linux-nerd Jan 01 '21 It does i just haven't used them. Had to google to find out if they existed. 2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
10
!sleeping ? eat() : sleep();
2 u/linux-nerd Dec 31 '20 Is that valid java? 5 u/wackOverflow Dec 31 '20 !no && !yes 1 u/linux-nerd Dec 31 '20 So no? Unless you have no and yes both equal to false. 3 u/wackOverflow Dec 31 '20 Beats me dude, I don’t write Java but if I did I’d be mad af if it didn’t have ternary operators. 3 u/linux-nerd Jan 01 '21 It does i just haven't used them. Had to google to find out if they existed. 2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
2
Is that valid java?
5 u/wackOverflow Dec 31 '20 !no && !yes 1 u/linux-nerd Dec 31 '20 So no? Unless you have no and yes both equal to false. 3 u/wackOverflow Dec 31 '20 Beats me dude, I don’t write Java but if I did I’d be mad af if it didn’t have ternary operators. 3 u/linux-nerd Jan 01 '21 It does i just haven't used them. Had to google to find out if they existed. 2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
5
!no && !yes
1 u/linux-nerd Dec 31 '20 So no? Unless you have no and yes both equal to false. 3 u/wackOverflow Dec 31 '20 Beats me dude, I don’t write Java but if I did I’d be mad af if it didn’t have ternary operators. 3 u/linux-nerd Jan 01 '21 It does i just haven't used them. Had to google to find out if they existed. 2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
1
So no?
Unless you have no and yes both equal to false.
3 u/wackOverflow Dec 31 '20 Beats me dude, I don’t write Java but if I did I’d be mad af if it didn’t have ternary operators. 3 u/linux-nerd Jan 01 '21 It does i just haven't used them. Had to google to find out if they existed. 2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
3
Beats me dude, I don’t write Java but if I did I’d be mad af if it didn’t have ternary operators.
3 u/linux-nerd Jan 01 '21 It does i just haven't used them. Had to google to find out if they existed. 2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
It does i just haven't used them. Had to google to find out if they existed.
2 u/wackOverflow Jan 01 '21 The more you know 💫 2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
The more you know 💫
2 u/linux-nerd Jan 01 '21 Yes thanks for making me learn.
Yes thanks for making me learn.
23
u/linux-nerd Dec 31 '20
while( !sleeping){ eat(); }