r/badcode • evil • Oct 13 '21

java format.format

Post image
610 Upvotes

70 comments sorted by

View all comments

Show parent comment

1

u/inventord Oct 14 '21

I didn't actually make this code, just to clarify. I did learn the == lesson the hard way though. I was comparing two UUIDs and it didn't warn me, so I was super confused until a kind spigot user informed me that UUIDs also need to be compared with .equals.

1

u/Kilobyte22 Oct 14 '21

One of the many reasons I've abandoned Java for nicer languages. Even if I'm forced to use the JVM there are good alternatives, like Scala and Kotlin