r/ProgrammerHumor • • Jul 20 '18

Every Time

Post image
52.2k Upvotes

749 comments sorted by

View all comments

Show parent comments

6

u/dov1 Jul 20 '18

Nothing except that when you're working with arrays you really need to understand what Java is doing with the array, or you can end up with an unexpected output. This is true for the same exact code. If the dev understands it it works well if not it doesn't.

Edit: disclaimer, Java developer

4

u/minnek Jul 20 '18

What are you doing with arrays to cause undefined behavior in Java??

1

u/Kered13 Jul 20 '18

Huh? I honestly can't think of any way to misuse arrays in Java. They're bounds checked so it's not possible (at least normally) to have any memory violation.

2

u/dov1 Jul 20 '18

Damn. I forgot to add /s. I thought the last line about it depending on the developer's knowledge would have given it away.