GTA 5 Java Coffee shop

JPDev@programming.dev to Programmer Humor@programming.dev – 225 points –
13

The void function seems to return an int

I wonder how often someone walks in and tells them about the mistake. Do the baristas have a standard response?

It's a video game so I'm guessing they do have a standard response

Oof, and there's only ten lines of code, too. And they look very purposefully written out.

Yes, but maybe there’s some magic going on so that the lack of a type assigns some value that results in void?

Why does someone come up with java code for an in-game coffeeshop and then make an obvious mistake? Or is that on purpose and they are trolling?