-
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?
-
Is the Scanner object a replacement or just an added class? You must be using jdk1.5 correct?
-
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.
-
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..
-
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.
-
O.K. Well thank you a bunch for your help.
-
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.