aspose file tools*
The moose likes Java in General and the fly likes An interview question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "An interview question" Watch "An interview question" New topic
Author

An interview question

Mani vannan
Ranch Hand

Joined: Aug 21, 2004
Posts: 185
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.


Manivannan
Chetan Raju
Ranch Hand

Joined: Aug 02, 2006
Posts: 109
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

Joined: Aug 02, 2006
Posts: 109
However, I guess you cannot develop and compile in 1.3 which has features of 1.5
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Mani vannan
Ranch Hand

Joined: Aug 21, 2004
Posts: 185
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

Joined: Oct 20, 2005
Posts: 257

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
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
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.


Ping & DNS - my free Android networking tools app
Rudra Narayan Garnaik
Ranch Hand

Joined: May 05, 2006
Posts: 39
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


Regards, Rudra Narayan
www.garnaik.com
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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!


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: An interview question