Java Precisely, Third Edition, describes Java 8.0, including lambda
expressions, method reference expressions, functional interfaces,
streams, parallel streams, and parallel array operations.
It is a quick reference for the reader who has learnt (or is
learning) Java from a standard textbook, and who wants to know the
language in more detail.
Here's a bonus note with Java
performance tips (updated April 2005).
Here's another bonus note which summarizes the results
of Java floating-point
operations; they are as expected for the IEEE 754-2008
standard for floating-point arithmetic.
(January 2009). Here are some lecture slides that
explain IEEE 754 floating-point arithmetics and the
accompanying Java source code.
One more bonus note
about microbenchmarks in
Java with source code (updated
See also C# Precisely.
The third edition (2016)
Java Precisely, Third Edition, describes Java 8.0 and has 199 pages
and 216 examples; it will appear March 2016. See
page at MIT Press.
Example programs from the third edition
The second edition (2005)
Java Precisely, Second Edition, describes Java 5.0 and has 142 pages,
a comprehensive index and 165 examples.
P. Sestoft, Java
Precisely, Second Edition, The
MIT Press August 2005. ISBN 0-262-69325-9. List price: US $18.95.
Get it from Amazon.com
Example programs from the second edition
The first edition (2002)
The first edition gives a concise description of the Java programming
language (Java 2 JDK 1.3 and 1.4) in 107 pages plus a comprehensive
index. It includes 114 examples; see below.
P. Sestoft, Java
Precisely, The MIT Press
June 2002. ISBN 0-262-69276-7. List price: US $16.95.
Get it from Amazon.com
Some reviews of the first edition
Example programs from the first edition
Java Precisely and its example programs come with no warranty of any
kind, either expressed or implied. In no event shall I or the Royal
Veterinary and Agricultural University or the IT University of
Copenhagen or The MIT Press be liable for any damage resulting from
The zero'th edition: old online version (2000)
The old online version (September 2000) has no material on the
collection classes, on input and output, the
statement, and a number of other things. Also, the index and the
layout are better in the printed version.
- Old version, browsable with hyperlinks: PDF (410 KB)
The hyperlinks are colored, so this prints poorly on a
- Old version, printable A5 booklet (two pages to one): PDF (249 KB) and Postscript (416 KB).
Print on a duplex printer, then fold down the middle of the
sheet, and you have a booklet. You must use a duplex printer.
- Old version, printable A5 format (two pages to one): PDF (246 KB) and Postscript (411 KB).
- Old version, printable A4 format: PDF
(245 KB) and Postscript (386 KB).
Print on a duplex printer!
- Old version example programs as a jar file (88 KB) or as a zip file (83 KB) or as a gzipped tar file (31 KB).
Any individual or institution has the right to download, print and
reproduce the September 2000 online version of Java Precisely, but not
to modify or sell it -- except that copies may be sold to students at
the cost of reproduction.
Any individual or institution may make electronic copies of the
September 2000 online version of Java Precisely available locally
(within an organization), but not publicly, e.g. on the Internet.
Thanks to Rasmus Lund, Niels Hallenberg, Hans Henrik LÝvengreen,
Christian Gram, Jan Clausen, Anders Peter Ravn, Bruce Conrad, Brendan
Humphreys, Hans Rischel and Ken Friis Larsen for their useful
comments, suggestions, and corrections. Special thanks to Rasmus Lund
for letting me adapt his collections diagram for this book. Warm
thanks to the editors Bob Prior and Deborah Cantor-Adams, and the very
careful copy editor, at The MIT Press.
Java Precisely was written using the following software: Linux, GNU
Emacs, LaTeX 2e, xfig, xdvi, dvips, psselect, psnup, ps2pdf,
Ghostview, Adobe Acrobat Reader, Netscape Navigator, CVS, GNU make,
GNU tar, sed, zip, Moscow ML, IBM's Jikes, IBM's JIT JVM for Linux,
and Sun Microsystems' javac and jar.
This material is Copyright (c) 2000 Peter Sestoft and Copyright (c)
2002, 2005, 2016 The MIT Press.
Peter Sestoft (email@example.com) 2005-07-19, 2016-02-06