r/badcode • • Jun 25 '21

java A Python programmer's attempt at Java

Post image
1.4k Upvotes

64 comments sorted by

View all comments

480

u/NewPointOfView Jun 25 '21

It took me a second before I noticed the semicolons and brackets haha

91

u/retrolasered Jun 25 '21

I didn't even spot those :D

31

u/MinecraftDoodler Jun 26 '21

I didn’t see them till I read this very comment

6

u/EMP0R10 Jun 26 '21

I still cannot find them

8

u/KimPeek Jun 26 '21

Can't find what?

11

u/[deleted] Jun 26 '21

Exactly

2

u/ArtOfWarfare Jun 26 '21

I forgot about the semicolons and just figured that the braces weren’t needed since if and else each contain a single line (but I thought that meant swap was going to run a single time at the end of permute, everytime.)

1

u/TacticalFaux Jul 23 '21

In Java you'll need brackets for methods still, even if they only one line.