• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The Java API Documentation and Java 1.7

 
Bill Jillians
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a beginner programmer and I'm just really getting to grips with the language. A few people have pointed me in the direction of the API documentation in order to find out what methods are available. I also have Horstmann and Cornell to refer to which covers JDK up to 1.5.

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
Ranch Hand
Posts: 583
Firefox Browser Notepad Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html
 
Bill Jillians
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 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.
 
Bill Jillians
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bill Jillians
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Junilu Lacar
Bartender
Posts: 7607
54
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if all else fails, you can always use the JavaRanch message editor. You don't even have to click "Submit" to post your message if all you need is a handy link to get to the JavaDocs. Type in the fully qualified name of the class in the editor, then click on the "Preview" button. The preview will display the class name as a link to the API documentation if it's a standard Java class.

Example: java.util.Scanner
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic