(Please help) Code compiled using JDK 1.5.X, Can be run using JRE 1.4.2?

I know this can well be turn out to be a dumb question, but just wanted to know.Is it possible to compile my code using JDK 1.5 and then run the code using JRE 1.4.2?Can somebody pinpoint on reason behind it?Thank youMessage was edited by: HarshaVardhan
[295 byte] By [HarshaVardhana] at [2007-11-26 15:33:32]
# 1

Yes you can do that. See the documentation for the javac compiler, specifically the -target and the -source options.

Reason behind it? There are features in Java 1.5 code that earlier Java versions do not understand. Using the correct options when compiling creates bytecode that doesn't contain any "unknown" features. Of, course, you can't use any of the new features in your source code.

ChuckBinga at 2007-7-8 21:50:41 > top of Java-index,Desktop,Runtime Environment...