內容大鋼
本書是經典的《Java核心技術卷Ⅰ:基礎知識》的新版。這一版對全書進行了全面修訂,以涵蓋Java21的新特性。
新版延續之前版本的優良傳統,囊括了Java的全部基礎知識,用數百個實際的工程案例,全面系統地講解了Java語言的核心概念、語法、重要特性、開發方法。著力讓讀者在充分理解Java語言和Java類庫的基礎上,靈活應用Java提供的高級特性,具體包括Java語言基礎、面向對象編程、反射和代理、介面和內部類、異常處理、泛型編程、集合類框架、併發編程、註解和Java平台模塊系統等內容。
本書適合想將Java應用於實際項目的軟體開發人員、高等院校教師和學生參考閱讀。
作者介紹
(美)凱·S.霍斯特曼|責編:陳燦然
凱·S.霍斯特曼(Cay S.Horstmann ),聖何塞州立大學電腦科學系教授、Java的倡導者。他是《Java核心技術》兩卷本的作者,並著有Core Java SE 9 for the Impatient, Second Edition和Scala for the Impatient, Second Edition(均由Addison-Wesley出版)。他還為專業程序員和電腦科學專業的學生撰寫過數十本其他圖書。
目錄
Chapter 1 An Introduction to JavaJava 概述
1.1 Java as a Programming PlatformJava 程序設計平台
1.2 The Java「White Paper」BuzzwordsJava 「白皮書」中的口號
1.2.1 Simple 簡單
1.2.2 Object-Oriented 面向對象
1.2.3 Distributed 分散式
1.2.4 Robust 健壯
1.2.5 Secure 安全
1.2.6 Architecture-Neutral 體系結構中立
1.2.7 Portable 可移植
1.2.8 Interpreted 解釋型
1.2.9 High-Performance 高性能
1.2.10 Multithreaded多 線程
1.2.11 Dynamic 動態
1.3 Java Applets and the Internet Java Applet與Internet
1.4 A Short History of Java Java簡史
1.5 Common Misconceptions about Java 對Java的常見誤解
Chapter 2 The Java Programming Environment Java編程環境
2.1 Installing the Java Development Kit 安裝Java開發工具包(JDK)
2.1.1 Downloading the JDK 下載JDK
2.1.2 Setting Up the JDK 設置JDK
2.1.3 Installing Source Files and Documentation 安裝源文件和文檔
2.2 Using the Command-Line Tools 使用命令行工具
2.3 Using an Integrated Development Environment 使用集成開發環境
2.4 JShell
Chapter 3 Fundamental Programming Structures in Java Java的基本編程結構
3.1 A Simple Java Program 一個簡單的Java程序
3.2 Comments 註釋
3.3 Data Types 數據類型
3.3.1 Integer Types 整型
3.3.2 Floating-Point Types 浮點類型
3.3.3 The char Typechar 類型
3.3.4 Unicode and the char TypeUnicode與char類型
3.3.5 The boolean Type boolean類型
3.4 Variables and Constants 變數與常量
3.4.1 Declaring Variables 聲明變數
3.4.2 Initializing Variables 初始化變數
3.4.3 Constants 常量
3.4.4 Enumerated Types 枚舉類型
3.5 Operators 運算符
3.5.1 Arithmetic Operators 算術運算符
3.5.2 Mathematical Functions and Constants 數學函數與常量
3.5.3 Conversions between Numeric Types 數值類型之間的轉換
3.5.4 Casts 強制類型轉換
3.5.5 Assignment 賦值
3.5.6 Increment and Decrement Operators 自增與自減運算符
3.5.7 Relational and boolean Operators 關係與 boolean 運算符
3.5.8 The Conditional Operator 條件運算符
3.5.9 Switch Expressionsswitch
3.5.11 Parentheses and Operator Hierarchy 括弧與運算符優先順序
……
Chapter 4 Objects and Classes 對象與類
Chapter 5 Inheritance 繼承
Chapter 6 Interfaces, Lambda Expressions, and Inner Classes 介面、Lambda表達式和內部類
Chapter 7 Exceptions, Assertions, and Logging 異常、斷言和日誌
Chapter 8 Generic Programming 泛型編程
Chapter 9 Collections 集合類
Chapter 10 Concurrency 並法
Chapter 11 Annotations 註解
Chapter 12 The Java Platform Module System Java平台模塊系統
Appendix 附錄