...
Traditional languages such as C and C++ allow unspecified or implementation-defined behavior, which leads to vulnerabilities when a programmer makes assumptions about the underlying behavior of an API or language construct. The Java Language Specification, by contrast, standardizes language requirements where whenever possible, because Java is designed to be a cross-platform language. Even then, certain behaviors are left to the discretion of the implementer of the Java Virtual Machine (JVM) or the Java compiler. These guidelines identify such language peculiarities and suggest solutions to help implementers address the issues and let programmers appreciate and understand the limitations of the language and navigate around them.
...