Think Java cover

Think Java

Rating 3.5
Word count
325K words
Chapters
18
Series
Turing Programming Series
ISBN
9787115440150

Tags

Summary

Think Java is an introductory Java textbook in the "Turing Programming Series," originally written by Allen B. Downey and Chris Mayfield under the title Think Java: How to Think Like a Computer Scientist. It does not intend to list Java syntax item by item as a manual; rather, it hopes readers will grasp the basic concepts of computer science while writing code, gradually forming the habit of "thinking like a computer scientist" and making "problem solving" the main thread of learning to program. The book has 14 chapters and 3 appendices. It opens with "The Way of the Program," defining programming languages, programs, and debugging, and leading readers to write their first Hello World program; it then proceeds through variables and operators, input and output, void methods and value methods, conditionals and logic, recursion, loops, arrays, strings, objects and classes, and finally to arrays of objects, objects of arrays, and "objects that contain other objects," naturally drawing out object-oriented ideas such as encapsulation and inheritance. The book makes extensive use of state diagrams, stack diagrams, class diagrams, and a Card/Deck example to explain abstract concepts, helping readers "see" how variables change in memory and how method calls proceed. Each chapter ends with a glossary and exercises, and terms are clearly explained at first appearance for beginners to look up at any time. The three appendices cover development tools, Java 2D graphics, and debugging, supporting hands-on practice. The book is concise (about 202 pages in the Chinese edition), emphasizing conceptual understanding and debugging skills rather than breadth of API. It suits university introductory computer science or Java courses, and also beginners learning programming on their own as their first Java book; to experienced programmers it is closer to a thinking-training reader that "explains the basics clearly again."

Editor's review

在 Java 入门书里,《Java编程思维》是个不太一样的选项。它不追求把语法大全一次讲完,也不会用一大段“企业级框架”来吓退新手,而是沿着作者在欧美高校讲授计算机导论课的经验,把编程拆成一个个能立刻动手的小问题:先让程序跑起来,再问为什么它能跑、哪里会出错、怎样证明它是对的。 这本书最值得称道的是“可视化”的教学意识。状态图帮你盯住每一个变量的取值,栈图把方法调用的来龙去脉摊开,类图画清对象之间的关系;纸牌的例子从单张 Card 一路做到 Deck、手牌与牌局,代数式的封装、泛化、排序与继承都在同一个情境里长出来,读者不需要在零散例子间反复跳频道。每章末的术语表和练习也让自学有了抓手,读完一章就能自测。 篇幅是它的另一项优点。中文版 200 页上下,一口气读完并不吃力,却已经把条件、循环、递归、数组、字符串、对象、类与继承这些主干讲到了。若你正在寻找一本“读完能真正写出小程序、并且知道自己在写什么”的 Java 第一书,它值得放在书桌上;若想要的是 API 速查或框架实战,则不必在此停留。

Who it's for

A good fit for

  • 零基础的编程初学者,希望第一本 Java 书就把概念讲透
  • 高校计算机导论、Java 入门课程的师生,需要可按章节推进的教材
  • 自学编程的转行者,想先建立计算思维再进入框架与项目
  • 有 Python 等其他语言基础、打算补上 Java 与面向对象基础的读者

Not a good fit for

  • 已有多年 Java 经验、想深入 JVM、并发或 Spring 生态的开发者
  • 需要 API 大全或语法速查手册、打算随查随用的读者
  • 只想要项目实战与面试题速成、不愿系统读概念的人

Reading tips

  1. 按章节顺序阅读,每章先动手敲完示例代码再看术语表与练习,不要跳过练习
  2. 准备纸笔或白板,跟着书中状态图、栈图自己画一遍方法调用与变量变化
  3. 读完第 10—14 章后,用纸牌示例重写一个小程序,检验封装、继承与排序是否真懂
  4. 把附录 C 的调试部分当成工具书,遇到编译错误、运行时异常时按类型对照排查

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Preface
  2. Chapter 1 The Way of the Program
  3. Chapter 2 Variables and Operators
  4. Chapter 3 Input and Output
  5. Chapter 4 Void Methods
  6. Chapter 5 Conditionals and Logic
  7. Chapter 6 Value Methods
  8. Chapter 7 Loops
  9. Chapter 8 Arrays
  10. Chapter 9 Strings
  11. Chapter 10 Objects
  12. Chapter 11 Classes
  13. Chapter 12 Arrays of Objects
  14. Chapter 13 Objects of Arrays
  15. Chapter 14 Objects That Contain Other Objects
  16. Appendix A Development Tools
  17. Appendix B Java 2D Graphics
  18. Appendix C Debugging

FAQ

这本书适合完全没写过代码的人吗?
适合。全书从“何为编程”“何为计算机科学”讲起,第一个程序就是 Hello World,术语首次出现即给定义,每章还有术语表和练习,作者的定位就是计算机科学导论课与编程初学者。
它和《Java编程思想》(Thinking in Java)是同一本书吗?
不是。《Java编程思维》原著为 Allen B. Downey 与 Chris Mayfield 的 Think Java,人民邮电出版社 2017 年出版,袁国忠译;《Java编程思想》是 Bruce Eckel 的 Thinking in Java,由机械工业出版社出版,两本书从书名到内容都不同。
书里用的 Java 版本是哪个?
这本教材刻意保持轻量,只使用 Java 的基础语法与标准库中最核心的部分(如 System、Scanner、Math 等),不依赖新版本特性,因此用较新的 JDK 也能顺利运行书中示例。
需要先学数据结构或算法再读吗?
不需要。书中的数组、查找、排序(选择排序、合并排序)等内容本身就是入门级的讲解,具备基本的变量与循环概念即可跟上,读完后对数据结构会有一个直观的起点。
读完之后下一步该看什么?
可以接着读更系统的 Java 语言教程补足集合、泛型、异常与并发,再进入 Spring 等框架和项目实践。这本书的价值在于打好概念与调试基础,而不是覆盖 Java 的全部 API。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category