| Books & Tools | Techniques | |
|
Comprehensive coverage of Ruby 1.8 and 1.9
"The New Most Important Ruby Book" JudeJude is my Java documentation browser. It combines Sun's definitive javadocs with the easy-to-use format of Java in a Nutshell, and tops it off with easy keyboard-based navigation and full-text searching. Jude is available for free evaluation. See the user's guide for more info Java in a NutshellThe 5th edition is now out, with complete coverage of Java 5.0! It includes a fast-paced tutorial on the language, and a compact quick-reference for the core Java API. Java Examples in a NutshellThe 3rd edition, updated for Java 1.4 This edition has all-new coverage of the NIO and JavaSound APIs, completely rewritten Servlets and XML chapters, and coverage of new Java 1.4 features (assertions, logging, preferences, SSL, etc.) added througout. A great book for those who like to learn by example. 193 working examples: 21,900 lines of carefully commented code to learn from. Java 1.5 Tiger: A Developer's NotebookAmazon incorrectly credits me as the main author on this book. I'm actually the second author: really more of a consultant. This is a good book about all the language changes in the latest version of Java. Effective JavaI didn't write this excellent book, but I wish I had. Author Josh Bloch is probably best known for the collections classes in the java.util package. His experience and wisdom are apparent in this book. I learned from it and recommend it highly. |
October 08, 2004AbstractStringBuilderOne of the new features of Java 5.0 is the StringBuilder class, which is just like StringBuffer, but without synchronized methods. Since StringBuilder and StringBuffer have so much in common, they both extend the same superclass: AbstractStringBuilder. You wouldn't know this from looking at the javadocs, however: they indicate that both classes extend Object. Turns out that AbstractStringBuilder is not a public class, so in order to find out about it, you have to look at the source code (or the class files). This is the first instance that I am aware of of a public class extending a non-public one, and it raises questions about documenting the public one. The javadoc team dealt with it by simply pretending that the non-public intermediary class does not exist. Now I have to figure out how to document this for Java in a Nutshell. It seems to me that this was a real missed opportunity. If AbstractSt ringBuilder had been public we could write methods that would work with either a StringBuffer or a StringBuilder argument. Update: AbstractStringBuilder and its subclasses demonstrate another new feature of Java 5.0: covariant returns. This is the ability to narrow the return type of a method when you override it in a subclass. It got added to the language along with generics. Many of the abstract methods in AbstractStringBuilder return an AbstractStringBuilder. When StringBuilder overrides those methods, it narrows the return type to StringBuilder. When StringBuffer overrides those methods it narrows the return type to StringBuffer. The compiler emits synthetic methods to make this work under the covers.
|
Advertising
About
Store
Search
Archives
April 2008
March 2008 February 2008 January 2008 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 April 2005 March 2005 February 2005 December 2004 October 2004 September 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 Syndicate
|