• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An interview question

 
Mani vannan
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chetan Raju
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There will be always a downward compatibility. You can run your JDK 1.3 on JDK 1.5. However, many of the older functionalities have been deprecated in new releases and probably you need to use appropriate runtime parameters to compile and run JDK 1.3 code on higher versions.
 
Chetan Raju
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However, I guess you cannot develop and compile in 1.3 which has features of 1.5
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mani vannan:
--
You have JDK 1.3 for development. Using that, how will you develop code with all features of JDK1.5?
--


You won't, obviously - otherwise there wouldn't be a need for the existence of JDK1.5.
 
Mani vannan
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with all of your replies. But, when my friend told the same answer, the interviewer not convinced. Let me check; anyway,thanks for you all.
 
Srinivas Kalvala
Ranch Hand
Posts: 257
Firefox Browser Hibernate Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't know what the intent of the question was. Interview questions don't necessarily have an answer, or just a single "correct" answer. It may have been asked to get the interviewee to speculate about options, and see what kind of approaches he might come up with.
 
Rudra Narayan Garnaik
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a simple question. The interviewer asked this question to your friend to check his/her confident. The answer is already written by some guys.

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.

Thanks
Rudra Narayan
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are some features in 1.5 (and 1.4) that you could approximate with 3rd party libraries ... concurrent package and regular expressions come to mind. Truly new language features like generics, autoboxing, enhanced for and such you couldn't fake with normal tools.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually...

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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic