Sadly I am finding inconsistencies between these sources of information and I wonder if someone can help to explain where I should put my faith. For example, on pages 56-59 of the 7th edition of the book the authors mention a String class and a Scanner class. Neither of these classes exist in the API documentation for JDK 1.7 which presumably should be the most up to date document. However the example 3-2 InputTest.java on page 59 compiles perfectly well under JDK 1.7.
Has there been a change in the structure of 1.7 and if so how much importance should I give to H&C. Is the book now outdated or is there more information I need besides the JDK 1.7 API documentation to see what methods are available?
Many thanks
Bill
saloni jhanwar wrote:http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html
Thanks ... that is fine if you already know about it. My problem is that I don't and I would naively have thought if it wasn't contained in the API documentation which I installed on my computer when I installed Java 1.7 that it might have been superceeded.
Regards
Bill
And (as far as I know) no publicly defined class has ever been removed from the Java API. Some have been marked as deprecated with a warning that they may be removed from future releases but I don't believe this has ever happened.
Adrian Burkett wrote:Where did you get your API documentation from ? The String class has been in Java from the start and the Scanner class since Java 1.5.
And (as far as I know) no publically defined class has ever been removed from the Java API. Some have been marked as deprecated with a warning that they may be removed from future releases but I don't believe this has ever happened.
Ah .. its OK ... looks like I rushed to post too soon. The link I was given in another post has the String class. The version I was looking at on my computer seems to be missing some key information. OK .. I know where to look now.
Many thanks
Bill
Dennis Deems wrote:As you work through the book, I suggest you use this API: http://docs.oracle.com/javase/1.5.0/docs/api/ That way you'll know the docs and the text are in sync. You can always update your knowledge to version 7 when you're done with the book.
Thanks for that. I've bookmarked this link and also the one for 1.7. I didn't realize that once a feature is introduced in the API it doesn't get removed later. That helps my general understanding.
Example: java.util.Scanner
Practice only makes habit, only perfect practice makes perfect.
Practice mindfully by doing the right things and doing things right.— Junilu
[How to Ask Questions] [How to Answer Questions]

Consider Paul's rocket mass heater. |