|
-
Oct 24th, 2004, 03:18 PM
#1
Thread Starter
Frenzied Member
new sdk..{resolved}
If I was to get an updated sdk, would I still be able to compile and use older programs? For instance, in the sdk I use right now, for I/O you would use BufferedReader. In the newer sdk they have a Scanner object or something. So would it compile the older programs?
Last edited by System_Error; Oct 24th, 2004 at 07:34 PM.
-
Oct 24th, 2004, 03:31 PM
#2
Dazed Member
Is the Scanner object a replacement or just an added class? You must be using jdk1.5 correct?
-
Oct 24th, 2004, 03:42 PM
#3
Dazed Member
If you are running say sdk1.5.0 you would be able to compile and run older programs but you would not be able to do the same using an older sdk build if any of your code uses new features found in subsequent versions of the sdk.
-
Oct 24th, 2004, 05:01 PM
#4
Thread Starter
Frenzied Member
Right now I use sdk 1.3..I think. Not too long ago I tried to compile source code made by someone else in sdk 1.5 and I wasn't able to because it had the Scanner object in place of bufferedReader.. Im not sure if it is taking place or if it is just an added class. I just was thinking about upgrading to sdk1.5 and wanted to make sure I coud compile stuff I wrote in 1.3..
-
Oct 24th, 2004, 05:51 PM
#5
Dazed Member
According the the java docs a java.util.Scanner is a new class and not a replacement for java.io.BufferedReader. Two totally different classes in two different packages. Yeah backwards compatibility for previous sdk builds should be there unless a class was dropped in the new jdk version.
-
Oct 24th, 2004, 07:33 PM
#6
Thread Starter
Frenzied Member
O.K. Well thank you a bunch for your help.
-
Oct 25th, 2004, 06:59 PM
#7
JDK 1.5 is not fully backwards compatible, even though that was the idea. For example, the org.w3c.dom package in 1.5 contains DOM3 interfaces, older JDKs have DOM2 interfaces. The result is that you can't compile any classes that implement the old interfaces, because they suddenly don't implement the full interface anymore, making them abstract without being marked as such.
Apache Cocoon is one application that fails to compile on 1.5.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|