Originally posted by Mani vannan:
This was an interview question, my friend was asked:
You have JDK 1.3 for development. Using that, how will you develop code with all features of JDK1.5?
(I am sure, the question is correct, but not able to guess the ans) Please, let us know if any body knows the answer.
The Question is not correct. The question is more related with testing the -source option of the javac command. You can produce 1.3 development with 1.5 but not 1.5 with 1.3.
We can try to compile jdk 1.3 in jdk 1.5 and some deprication warnings can come but the reverse is not true. We can not compile the jdk1.5 specific things in jdk 1.3. back compartibility is there but reverse is not possible. Dont confuse, the answer is no- we can do in that way.
Java 5 generics grew mainly from Gilead Bracha's work on the GJ compiler (based on other earlier work on the Pizza compiler) with which you could do generics in whatever JVM was current at the time. This was long enough ago that I'm sure it ran under 1.3, and probably 1.2.2.
I wrote a little database engine using GJ, some years ago. Memories...
Maybe the interviewer was looking for a real old timer!