While preparing for the SCJP exam, I come across the statement in various situations: "Be careful not every JVM enforces the rule... " What does that implys? Why people make such difference between the different versions of JVM? Any ideas? Thanks.
The JVM is just a piece of software like any other designed to be an interface between the code you write and the computer hardware. While all the JVMs are meant to follow certain rules in their interpretation of the Java language so as to meet the write once run everywhere idea, certain things are still left up to the jvm designers, such as how and when the garbage collector runs, or in deciding how different threads to share the cpu's time. Hope that short explanation cleared it up for you.
A corollary would be "a Java compiler may not catch all incorrect uses of modifiers" - for example, at one time you could declare a class with the "synchronized" modifier without getting a compiler error. I have not tried that with recent compilers. Bill