Thursday, December 30, 2010

Linux JDK1.4 and the distinction between instance resolves JDK1.6

In Linux with jdk1.6 wrote a program to compile the package, all is well, get the win, the same is 1.6 JDK, actually said what is incompatible with the type of compilation, illegal magicnumber. in Linux using jdk1.4.2 this classic version of recompiling it, find the following two exceptions: 1. in 1.4.2, assert is a keyword, you can not assert (booleanexpression): (String) to use, but in 1.6.

Compile in 1.4.2, will give a warning: asofrelease1.4, assertisakeyword, andmaynotbeusedasanidentifier and it gives me errors that say is semicolon errors (in fact, the compiler to assert as an identifier to handle newspaper's fault). 2. in 1.4.2, not as such to overrideclone () method publicNewClassclone () {...returnNewClass;} This is allowed in 1.6, is convenient. Only in 1.4.2 publicObjectclone () {...return ...;} Then there are the N number of type cast.

No comments:

Post a Comment