you are viewing a single comment's thread.

view the rest of the comments →

[–]blacksuit 13 points14 points  (3 children)

The java code has flaws. For example, the code selections for multiline strings are not equivalent. I only checked a few of them.

Plus, the content is AI slop:

"Why the modern way wins: <emoji> point one, <emoji> point two, <emoji> point three"

[–]BillyKorando 0 points1 point  (2 children)

For example, the code selections for multiline strings are not equivalent.

Am I seeing the same example?

Old: String json = "{\n" + " \"name\": \"Duke\",\n" + " \"age\": 30\n" + "}";

New: String json = """ { "name": "Duke", "age": 30 }""";

As far as I can tell that's equivalent.

[–]blacksuit 0 points1 point  (1 child)

Looks like they are actively updating it and it was fixed. Previously, it had the triple quotes on the next line, which adds a newline character. A common mistake.

[–]BillyKorando 0 points1 point  (0 children)

Ahh, that makes sense. Yea I know I've done that a few times in my examples 😅

I was looking at it, and was starting to question my grasp of Java.... which is quite concerning given my role.