Java in 24 Hours, 8th Edition cover

Java in 24 Hours, 8th Edition

No rating yet
Chapters
28
Series
Sams Teach Yourself…in 24 Hours (Chinese translation of Java in 24 Hours)
ISBN
9787115546050

Tags

Summary

Sams Teach Yourself Java in 24 Hours (8th Edition) is the Chinese translation of the acclaimed beginner's guide, published by Posts & Telecom Press in October 2020. Organized into 24 chapters designed around a "one hour per chapter, complete in 24 hours" structure, the book targets readers with no prior programming experience.

The opening chapters begin with "what programmers do," then guide readers through installing development tools, writing and running their first Java program, and understanding how Java code travels from source file to bytecode. The book then moves into language fundamentals: variable types and assignment, integers and floating-point numbers, characters and strings, Boolean values, operators, conditionals, loops, and arrays. The middle section covers object-oriented programming: creating objects, adding attributes and methods, inheritance and reuse of existing classes, and using data structures to store collections of objects. Later chapters address exception handling, threads, inner classes and lambda expressions, building and laying out graphical user interfaces with Swing, responding to user input, file I/O, the new HTTP client, Java2D drawing, and conclude with two hands-on projects: a Minecraft mod and an Android app.

Each chapter includes sample programs, output results, and code analysis, with Q&A sections, quizzes, and exercises at the end to help readers check their understanding. Appendices cover using the NetBeans IDE, finding Java learning resources, and troubleshooting the Android Studio emulator and NetBeans package errors. Written for Java 9, the book is ideal as a systematic introductory textbook to be read alongside hands-on coding practice.

Editor's review

很多 Java 入门书的问题是“讲得太全”,把语法、框架、虚拟机原理一股脑压在开头,新手翻不到一百页就放弃了。《Java入门经典》反过来做:一句一句带着你写第一个程序,讲清楚 class 和 main 各自在干什么,再一格一格推进到变量、判断、循环、数组和对象。 它的编排优势在于节奏。全书24章,每章都按一小时左右的阅读量设计,章节末尾固定有问答、测验和练习,读完就知道自己哪儿没懂。示例程序不玩花活,输出结果和代码分析摆在旁边,属于能照着敲、敲完就能跑的类型。 后半程的内容也不敷衍:线程、内部类与 Lambda、Swing 图形界面、文件读写、HTTP 客户端,最后落到 Minecraft Mod 和 Android 应用两个“有成就感”的实践项目上,对零基础读者来说,这一类项目比抽象练习题更能维持动力。 需要说明的是,本版基于 Java 9 编写,部分工具界面与 API(如 HTTP 客户端、Android 开发环境)到今天已有更新,读者照着操作时可能要对照新版文档做点调整。作为学语言本身的入门书,它依然扎实好用。

Who it's for

A good fit for

  • 零基础、第一次接触编程,想系统学一门语言的读者
  • 在校学生或转行者,需要用一本带练习题的书打牢 Java 语法
  • 有其他语言经验、想快速补齐 Java 面向对象与常用类库的开发者
  • 需要一本可当课件的教材的中小学或培训机构教师

Not a good fit for

  • 已有 Java 项目经验、想深入 JVM、并发或框架原理的进阶开发者
  • 希望直接学 Spring 等企业框架、完整项目实战的读者
  • 只想查阅语法速查、不愿跟着敲示例代码的读者

Reading tips

  1. 按章节顺序推进,每章的示例代码亲手敲一遍,再对照书中输出结果排查差异。
  2. 把章末的问答与练习当作自测,答错或做不出的地方回到对应小节重读,不要跳过。
  3. 读完前13章语法与面向对象部分后再进入 GUI、文件和 Android 章节,避免基础不牢。
  4. 动手前先确认本机 JDK 版本与书中所用 Java 9 的差异,遇到 API 变动以官方文档为准。

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. 第1章 成为一个程序员
  2. 第2章 编写读者的第一个程序
  3. 第3章 Java“度假”之旅
  4. 第4章 理解Java程序是如何运作的
  5. 第5章 在程序中存储和更改值
  6. 第6章 使用字符串进行通信
  7. 第7章 使用条件测试来做决定
  8. 第8章 用循环重复一个动作
  9. 第9章 用数组存储信息
  10. 第10章 创建第一个对象
  11. 第11章 描述对象
  12. 第12章 充分利用现有的对象
  13. 第13章 在数据结构中存储对象
  14. 第14章 处理程序中的错误
  15. 第15章 创建线程程序
  16. 第16章 使用内部类和Lambda表达式
  17. 第17章 构建一个简单的图形用户界面
  18. 第18章 布局图形用户界面
  19. 第19章 响应用户输入
  20. 第20章 读/写文件
  21. 第21章 使用Java 9的新HTTP客户端
  22. 第22章 绘制Java2D图形
  23. 第23章 使用Java创建Minecraft Mod
  24. 第24章 编写Android移动应用程序
  25. 附录A 使用NetBeans IDE
  26. 附录B 获取Java资源
  27. 附录C 修复Android Studio模拟器的一个问题
  28. 附录D 修复NetBeans IDE中不可见的包错误

FAQ

这本书适合完全没有编程基础的人吗?
适合。本书从“程序员做什么”、安装工具和第一个程序讲起,前几章不预设任何编程知识,后面按语法、面向对象、应用开发的顺序逐步推进,属于典型的零基础自学教程。
第8版和第7版主要有什么区别?
第7版由郝记生翻译、2015年出版(ISBN 9787115400369);第8版由金婧、郭慧翻译、2020年出版,基于 Java 9 改写,加入 JShell、Java 9 新 HTTP 客户端、Lambda 表达式与 Minecraft Mod 等内容,章节结构也做了调整。
书中用的是哪个 Java 版本和开发工具?
第8版基于 Java 9 编写,主要使用免费的 NetBeans IDE 演示示例,附录中另介绍了获取 Java 资源的方法以及 Android Studio 模拟器问题的处理。
书里的代码和练习在哪里获取?
出版社(异步社区)页面提供本书配套资源下载,包括示例源代码。购买后可在该页面按书号查找并下载;具体可用范围以出版社提供的内容为准。
读完这本之后该看什么?
可以转向《Java核心技术》打牢语言与类库基础,再根据方向选择《Effective Java》学编码规范、《Java并发编程实战》学并发,或用 Spring 相关书籍进入 Web 开发。

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