Think Java

How to Think Like a Computer Scientist

by Allen B. Downey

This is an old version of the book. Here is the current edition of this book, with co-author Chris Mayfield.

Download Think Java in PDF.

Read Think Java online.

Read more about Think Java on Facebook.

Think Java is an introduction to Java programming for beginners. It is tailored for students preparing for the Computer Science Advanced Placement (AP) Exam, but it is for anyone who wants to learn Java.

  • Think Java is concise. It uses a subset of Java that lets students work on interesting projects without getting bogged down in the details of Java.

  • Think Java teaches program development and debugging; these topics are discussed throughout the book and summarized in two appendices.

  • Think Java incorporates the GridWorld case study that is part of the AP Exam. The book provides the background you need to get started with the case study, and some additional exercises for practice.

  • Think Java is based on the original text of How to Think Like a Computer Scientist, a popular online textbook with versions in Python, C++ and OCaml, and translations into Spanish, French and other languages.

Think Java is a free textbook available under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License . Readers are free to copy and distribute the text; they are also free to modify it, which allows them to adapt the book to different needs, and to help develop new material.

A Spanish version of the book, translated by German Kruszewski and others, is available here. And their source documents are in this repository.

An Arabic version of the book, translated by Muhammad Saied, is here.

Download the LaTeX source code (with figures and a Makefile) in a zip file.

Other Free Books by Allen Downey

Think Stats: Probability and Statistics for Programmers

Python for Software Design: How To Think Like a Computer Scientist

The Little Book of Semaphores

Physical Modeling in MATLAB

Computational Modeling and Complexity Science

Learning Perl the Hard Way

Like this book?

Are you using one of our books in a class?

We'd like to know about it. Please consider filling out this short survey.


Think DSP

Think Java

Think Bayes

Think Python 2e

Think Stats 2e

Think Complexity