Has Java always supported backward compatibility of source code?
More precisely: considering the two versions of Java X and Y with X <Y, is any program for Java X also a valid program for Java Y with the same semantics? For example. X = Java 2 (or 1.2 with the old numbering) and Y = Java 5.
Or there is only compatibility at the JVM level: for example. class compiled for JVM 1.2 can be controlled by JVM 5?
If you can run Java 2 code on Java 5 (or 6 or 7), what are the exact steps that I have to follow? Compile directly using the Java 5 compiler? Compile using Java 2 compiler and run on JVM 5?
Giorgio
source share