Sams Teach Yourself Java in 21 Days (8th Edition) cover

Sams Teach Yourself Java in 21 Days (8th Edition)

No rating yet
Word count
762 words
Chapters
26
ISBN
9787115579201

Tags

Summary

Sams Teach Yourself Java in 21 Days (8th Edition) is the Chinese translation of the 8th edition of the classic introductory tutorial Sams Teach Yourself Java in 21 Days from the American publisher Sams. The book is organized around a 21-day learning pace and falls roughly into three parts. The first stage covers the basics of the Java language, including setting up a Java development environment, data types and variables, expressions and operators, objects, arrays, conditionals and loops, creating classes and methods, packages and interfaces, and exceptions and threads. The second stage moves on to the Java class library, introducing common data structures such as linked lists, stacks, and hash maps, and devotes considerable space to Swing graphical user interface development, including building interfaces, component layout, event handling (responding to user input), Java2D drawing, and developing Swing applications. The third stage turns to advanced topics: inner classes and lambda expressions, input and output, communicating over HTTP, using JDBC with the Derby database, reading and writing RSS feeds, making web service requests, and finally writing a game in Java. The book ends with appendices on using the NetBeans IDE, resolving the "package not visible" error in NetBeans, the book's companion website, and using the Java Development Kit (JDK). The 8th edition has been updated for Java 11 and Java 12, and the examples run in NetBeans, letting readers become familiar with modern Java development; each chapter includes examples, quizzes, and exercises so readers can learn by doing and check their grasp. Author Rogers Cadenhead is a veteran developer and author who has published more than thirty books on programming and web development and maintains the companion website java21days.com.

Editor's review

“21天学通”这类书名容易让人误会成速成书,但这本其实是“按天拆分的学习计划”,并不等于真的 21 天就能精通 Java。它的价值在于结构清楚:每天一个主题,语法基础、类库与图形界面、进阶开发三段式推进,读者不容易在庞大的 Java 知识里迷路。第 8 版跟上了 Java 11 与 Java 12,示例基于 NetBeans,附带的测试题与练习题也让自学有了反馈闭环。它把重点放在“能写出能跑的程序”上,从控制台到 Swing 界面再到 JDBC 数据库、HTTP 通信、Web 服务,最后用一个小游戏收尾,路径完整而不炫技。如果你已经看过很多概念书却一直没动手,这本书的节奏更适合你:每天一个明确的小目标,学完还能随时回头对照。需要提醒的是,书中数据库部分使用 Derby、界面部分以 Swing 为主,这些内容更偏教学与入门,正式项目里更主流的框架还需另行补充。作为“第一本 Java 书”,它稳妥、扎实,也足够亲切。

Who it's for

A good fit for

  • 完全没有编程基础、想系统入门 Java 的读者
  • 学过其他语言、想快速补齐 Java 语法与类库的程序员
  • 需要按课时推进的培训班学员或高校大中专学生
  • 希望边学边做小项目、重视动手练习的自学者

Not a good fit for

  • 想直接学习 Spring、MyBatis 等企业级框架的进阶开发者
  • 寻求 Java 并发编程、JVM 调优等深度专题的读者
  • 只想要速查手册、不打算循序阅读的读者

Reading tips

  1. 每天按书中的一个主题推进,当天写完示例代码并完成课后练习,不必强求一天一章。
  2. 先动手敲代码再看解释,遇到报错优先自己排查,必要时对照附录中 NetBeans 相关章节。
  3. 把第21天的游戏示例和数据库、Web服务章节当成综合练习,改造需求后再跑一遍。
  4. 学完后补一本讲集合框架或 Java 8 新特性的进阶书,弥补本书偏入门的部分。

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. Day 1 Getting Started with Java
  2. Day 2 Programming Basics
  3. Day 3 Working with Objects
  4. Day 4 Lists, Logic, and Loops
  5. Day 5 Creating Classes and Methods
  6. Day 6 Packages, Interfaces, and Other Class Features
  7. Day 7 Exceptions and Threads
  8. Day 8 Data Structures
  9. Day 9 Creating a Graphical User Interface
  10. Day 10 Building a User Interface
  11. Day 11 Arranging Components on a User Interface
  12. Day 12 Responding to User Input
  13. Day 13 Creating Java 2D Graphics
  14. Day 14 Developing a Swing Application
  15. Day 15 Using Inner Classes and Lambda Expressions
  16. Day 16 Input and Output
  17. Day 17 Communicating over HTTP
  18. Day 18 Accessing Databases with JDBC and Derby
  19. Day 19 Reading and Writing RSS Feeds
  20. Day 20 Making Web Service Requests
  21. Day 21 Writing a Game in Java
  22. Appendix A Using the NetBeans Integrated Development Environment
  23. Appendix B Fixing the "Package Not Visible" Error in NetBeans
  24. Appendix C The Book's Website
  25. Appendix D Using the Java Development Kit
  26. Appendix E Programming with the Java Development Kit

FAQ

这本书真的是21天就能学会Java吗?
“21天”指书中规划的21个学习单元,每天一个主题。按天推进可以形成清晰节奏,但真正掌握仍取决于每天投入的时间与练习量,对零基础读者来说通常需要更长的消化周期。
第8版对应哪个Java版本?
第8版主要针对 Java 11 与 Java 12 更新,示例在 NetBeans 中演示。之后版本的 Java 大多兼容书中示例,但遇到新语法或工具变化时仍需查官方文档。
零基础适合直接读这本书吗?
适合。本书从开发环境搭建和最基本的数据类型、变量讲起,配有测试题与练习题,属于面向初学者的入门教程。若有其他语言的编程经验,阅读会更快。
书中的图形界面和数据库内容还实用吗?
书中以 Swing 和 Derby 作为教学载体,思路清楚、易于上手,但企业开发中更常见的是 Web 框架和 MySQL 等数据库。建议把它们当作理解原理的练习,之后再补充主流技术栈。

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