|
|
|
|
|
by the_af
2211 days ago
|
|
Java is "safer" in the sense that the error is defined. If you try accessing an array with an out of bounds index, you'll get this exception. A language is less safe than Java if the resulting behavior is undefined, or even worse, if it's random or depends on the content of some other memory. Java doesn't claim it's magic. It's objectively safer by this measure. (More specifically, Java claims to be "memory safe" [1]) [1] https://en.wikipedia.org/wiki/Memory_safety |
|