
Java in a Nutshell
by David Flanagan · first published 1996
14mentions
6recommended by
14HN commenters
2009–2025first – last mentioned
43% recommend50% neutral7% critical
Why HN recommends it
Concise, clearly written reference and intro for Java, praised for accuracy and clarity; early editions suited C and C++ programmers learning Java, and it works well as a reference alongside the official docs.
Summarised by Claude from recommending comments
This handbook is a quick reference which provides an accelerated introduction to Java for C and C++ programmers who want to learn the language fast. The fourth edition of the handbook covers Java 1.4 beta that differs considerably from Java 1.3.
Affiliate links. As an Amazon Associate I earn from qualifying purchases.






…the graduate starting their career in software development. It's also easier to go up the stack to object oriented languages, particularly Java. The second chapter, first edition, of David Flanagan's Java in a Nutshell is still, in my opinion, the best intro to Java after having some experience with C.
on “45 years since its creation. The C language still very popular” ↗It's getting old, but the early editions of O'Reilly's "Java in a nutshell" (by David Flanagan) books were targeted specifically at C/C++ programmers learning Java. In my opinion, it's extremely well-written, being correct, clear, concise and engaging. From the 4th edition…
on “Best book to study Java” ↗…Otherwise, you can get into a kind of McCarthyism where there are good books and bad books, instead of each book having strengths and weaknesses. To put this in perspective, I personally really liked "Java in a Nutshell", because Flanagan's writing is brilliant. It's very succinct, yet covers all the cases, has a joie de vivre about it, and yet is so transparent it's easy to not notice it (Douglas Adam's prose also has…
on “[Ask HN] Good book about functional programming?” ↗…the same page: There are a small number of excellent Java books. I like the official specification and the books by Arnold and Gosling, Marty Hall, and Peter van der Linden. For reference I like the Java in a Nutshell series and the online references at Sun (I copy the javadoc APIs and the language specification and its amendments to my local disk and bookmark them in my browser so I'll always have fast access.)
on “Norvig IAQ: Can I get good advice from books on Java?” ↗Restful Web Services - great book and really opened up my thinking about how things behind web services can "resources" with different representations - rather than remote function calls. The original "Java In a Nutshell" - it was dry reading, but at the time is was sooo useful. C++ Primer Plus by Stephen Prata - this was the book that got me into programing "as a career" so to speak. I picked it randomly off the shelf…
on “Which programming book you just couldn’t stop reading from start to end?” ↗I can vouch for the quality of the Java documentation. Having learned Java primarily from the online javadoc pages, the Sun Java Tutorial, and Java in a Nutshell, I think the Java documentation really set the bar high.
on “Why is language documentation still so terrible?” ↗…sources. It's not Java's fault that it's presented this way because every technology is hyped by only listing the advantages and avoiding the talk about disadvantages. [1]1996 edition of David Flanagan's "Java in a Nutshell" -- https://books.google.com/books?ei=ZDHOVOztD4z8sASIsoKYAg&id=... (he removed the phrase "don't have to worry about memory management issues" from newer editions of the book: https://books.google.com/books?id=mvzgNSmHEUAC&printsec=fron...)…
on “Memory matters, even in Erlang (2010)” ↗I wrote some chapters. Great fun, but not worth it in terms of money. David Flanagan (java in a nutshell etc) couldn't do it any more, so it seems hard. He blogged about it somewhere... As always, if you make your expenses low enough, maybe...
on “Ask HN: Is it possible to live off technical writing?” ↗…Programming with Java by Barry J. Holmes and Daniel T. Joyce, page 544 Understanding object-oriented programming with Java by Timothy Budd, page 304 Teach yourself Java by Joseph O'Neil, page 184 Java in a Nutshell by Benjamin J. Evans, page 128 Java for Students by Douglas Bell and Mike Parr, page 490 Data structures and problem solving using Java by Mark Allen Weis, page 84 See here for a good article that…
on “Java was not underhyped in 1997 (2021)” ↗How do you know this isn't just a new language thing ? All of the advantages you say always result from essentially any redesign, and they never last. A quote from "Java in a Nutshell", from (I believe, 2002): "Because Java is a simple and elegant language with a well-designed, intuitive set of APIs, programmers write better code with fewer bugs than for other platforms, again reducing…
on “I’m joining the Go team at Google” ↗Strange, my first edition Java in a Nutshell was published February 1996, three months earlier.
on “The Original Java Whitepaper” ↗…code are doing. Ever had this situation when you read two pages of a book and realized you didn't really read anything, and have to re-read it (and 3 pages prior) to understand what's the point? That's Java in a nutshell, especially pre-1.8. As for Lisp and cognitive load, the difficulty comes from a) dynamic typing, and b) macros. The former makes bad naming choices much more painful, as you can easily lose track of…
on “Why I love Common Lisp and hate Java (2012)” ↗> no I don't, you win Because what they are actually like is java.awt — they are the classes used to implement graphics in Smalltalk-80, not some made-up example. (The "Java in a Nutshell 8th ed, I found has no page numbers. There's a "Subclasses and Inheritance" section which shows how to code PlaneCircle as a subclass of Circle class. afaict That's a couple of made-up classes that exist…
on “Java was not underhyped in 1997 (2021)” ↗…no standards working group anywhere was really considering and for which precious little documentation actually existed. There's a generation of us who held our copies of "Webmaster In A Nutshell" and "Java In A Nutshell" very close.
on “Open-R1: an open reproduction of DeepSeek-R1” ↗