Very, very introductory question...
Hi there -- I am trying to follow through the Wrox book "Beginning Java 2, Version 5," despite the fact that it is largely aimed at PCs and I am on a Mac...as well as the fact that I cannot install JDK 5 because I am on OSX 10.3.9, which only allows up to SDK 1.4!
I was attempting to compile a program which imports two math classes using this basic form: "import static java.lang.Math.sqrt" and also Math.ceil ....
I am compiling and editing them using XCode.
But for some reason these statements does not work. I know that I am typing them correctly, and in fact when I take away the "static" element of the import statement, it reduces the errors produced from 5 to 2, but there are still those two errors because allegedly java.lang.Math.sqrt and .ceil cannot be found!
When I import Math.*, that seems to work fine, but when I make a call to the sqrt or ceil classes, there is an error. Why would these functions not be in java.lang.Math.* ?? Surely sqrt and ceil are not new additions from 1.4 to 5??
Thanks for any help!