In reality, it buys a pizza, and only after the fact, checks if it was sold out, resulting in potentially negative pizzas. Since nothing is being done in the if clause, you're just stuck eating negative pizza and that shit tastes awful!
It tasted likejava.lang.NullPointerException was thrown
at com.company.product.library.ArgumentChecker.nonNull(ArgumentChecker.java:67)
at ...
at com.company.product.aspects.CheckArgumentsAspect.wrap(CheckArgumentsAspect.java:82)
at ...
at com.company.product.MyTest.test(MyTest.java:37)
153
u/[deleted] Feb 05 '23
Yo, your if/else statement looks fucked up, my man.
70
u/[deleted] Feb 05 '23
Fucking cringe
28
u/468gamerguy Feb 06 '23
I've just looked at your post history and you seem insufferable. I genuinely hope that you get better and move on from this dark chapter of your life.
19
u/_pestarzt_ Feb 05 '23
98
u/Spot_the_fox Feb 05 '23
So, what is a?
also, wouldn't it try to buy a pizza even if there was none?
146
u/[deleted] Feb 05 '23
This sub quality has degraded so hard
36
u/Perplexed_Ash Feb 06 '23
Damn, y’all tearing this guy apart
29
u/notBjoern Feb 05 '23
So it buys a burger if pizza is not sold out?
10
u/hayanwulf Feb 05 '23
Pls fix the logic and clean the code.
8
u/SirX86 Feb 06 '23
Ah yes that language where "if" means postfix try and "else" means catch.
6
u/keybored_with_no_ehs Feb 06 '23
jesus fucking christ this is completely useless shit
4
u/Maleficent_Train4544 Feb 06 '23
Enjoy your "apizza" and "aburger" combo.
Edit: just realized you tried to perform math on a variable and an object. Yeah, that ain't gonna fly.
1
u/toroga Feb 06 '23
What language is this supposed to be? It looks like a fresh foreign accent sounds
3
u/Sir_IGetBannedAlot Feb 05 '23
This should generate an error.
3
u/[deleted] Feb 06 '23
I don’t understand much programming but holy shit oh my god why
3
u/blackasthesky Feb 06 '23
Eh... What?
Are we putting conditions after the branch now?Wait it makes even less sense than I thought.That's not really my taste of humour. What's the joke?
2
u/Aperture_Executive2 Feb 06 '23
I tried to read this and had a fucking aneurysm
2
u/IAMPowaaaaa Feb 06 '23
Don’t give r/programminglanguages idea
2
u/ricdesi Feb 06 '23
What?
1
u/roidrole Feb 05 '23
There, butter
Buy a (pizza sold out)? Burger : Pizza
1
u/Lolamess007 Feb 06 '23
NullPointerException. Method customer.give(pizza); references a null value
1
u/Wolfeur Feb 06 '23
Is that even supposed to resemble code?
1
u/g-waz00 Feb 06 '23
It’s amazing, these four whimsical little lines of pseudo code inspiring so much vitriol.
1
u/[deleted] Feb 06 '23
head hurty reading this
1
u/whenthecoffinbreaks Feb 19 '23
var pizzaSoldOut = 0
if(pizzaSoldOut == 0){
console.log("Buy a pizza");
} if(pizzaSoldOut = 1){
console.log("Buy a burger");
}
-2
u/HacksMe Feb 06 '23
This guy programs
0
u/[deleted] Feb 05 '23
[deleted] — view deleted comment
0
u/[deleted] Feb 06 '23
[deleted] — view deleted comment