canYouSeeMe = !canYouSeeMe;
bleistift2@feddit.de 8 months ago
class Scratch { // Start of file public static void main(args: string[]) { int number1 = 2; number 1 = 10; int number2 = 13; boolean fo_sure = true; if (fo_sure) { number1 = number1 + 5 - 10 * 2 / 3; } System.out.println(number1); boolean canYouSeeMee = false; System.out.println(canYouSeeMe); if (canYouSeeMe) { canYouSeeMe = false; } else { canYouSeeMe = true; } System.out.println(canYouSeeMe); } }
What’d I win?
I find it interesting and unnerving that I understood the code, but not the youthspeak.
RedditWanderer@lemmy.world 8 months ago
bleistift2@feddit.de 8 months ago
There are even more optimization possibilities, but I wanted to stay as close to the original as possible.
Buddahriffic@lemmy.world 8 months ago
Yeah, it can be optimized down to a single constant print statement.
steersman2484@sh.itjust.works 8 months ago
Isn’t the second if condition
false
?bleistift2@feddit.de 8 months ago
Thanks, I corrected it.
prof@infosec.pub 8 months ago
Well done, here’s your price: 🏅
You may redeem it for a star on a GitHub repo of your choice.
It all gets put into the main method though in this version 😄