Java核心技术 卷I 基础知识 第10版 英文版 上下册

Java核心技术 卷I 基础知识 第10版 英文版 上下册
分享
扫描下方二维码分享到微信
打开微信,点击右上角”+“,
使用”扫一扫“即可将网页分享到朋友圈。
作者: [美] (Cay,S.,Horstmann)
2016-06
版次: 1
ISBN: 9787115420114
定价: 109.00
装帧: 平装
开本: 16开
纸张: 胶版纸
页数: 955页
字数: 1172千字
正文语种: 英语
69人买过
  • 本书是经典的《Java核心技术 卷I:基础知识》的新版。这一版针对Java SE 8平台进行了全面更新,以反映Java SE 8的特性。
    书中囊括了Java的全部基础知识,提供了大量完整且具有实际意义的应用示例,详细介绍了Java语言基础、面向对象编程、反射与代理、接口与内部类、事件监听器模型、使用Swing GUI工具进行图形用户界面程序设计、打包应用程序、异常处理、登录与调试、泛型编程、集合框架、多线程、并发等内容。 Cay S. Horstmann 是Scala for the Impatient的作者,还与人合著了Core JavaServer Faces。他是圣何塞州立大学计算机科学专业的教授,还是一名Java Champion,并经常在很多开发者大会上演讲。 目录

    Chapter 1: An Introduction to Java / Java概述  1
    1.1 Java as a Programming Platform / Java程序设计平台  1
    1.2 The Java“White Paper”Buzzwords / Java“白皮书”中的口号  2
    1.2.1 Simple / 简单  3
    1.2.2 Object-Oriented / 面向对象  4
    1.2.3 Distributed / 分布式  4
    1.2.4 Robust / 健壮  4
    1.2.5 Secure / 安全  4
    1.2.6 Architecture-Neutral / 体系结构中立  5
    1.2.7 Portable / 可移植  6
    1.2.8 Interpreted / 解释型  7
    1.2.9 High-Performance / 高性能  7
    1.2.10 Multithreaded / 多线程  7
    1.2.11 Dynamic / 动态  8
    1.3 Java Applets and the Internet / Java Applet与Internet  8
    1.4 A Short History of Java / Java简史  10
    1.5 Common Misconceptions about Java / 对Java的常见误解  13
    Chapter 2: The Java Programming Environment / Java编程环境  17
    2.1 Installing the Java Development Kit / 安装Java开发包(JDK)  18
    2.1.1 Downloading the JDK / 下载JDK  18
    2.1.2 Setting up the JDK / 设置JDK  20
    2.1.3 Installing Source Files and Documentation /源文件与文档的下载与设置  22
    2.2 Using the Command-Line Tools / 使用命令行工具  23
    2.3 Using an Integrated Development Environment / 使用集成开发环境  26
    2.4 Running a Graphical Application / 运行图形化应用程序  30
    2.5 Building and Running Applets / 构建并运行Applet  33
    Chapter 3: Fundamental Programming Structures in Java / Java的基本编程结构  41
    3.1 A Simple Java Program / 一个简单的Java程序  42
    3.2 Comments / 注释  46
    3.3 Data Types / 数据类型  47
    3.3.1 Integer Types / 整型  47
    3.3.2 Floating-Point Types / 浮点型  48
    3.3.3 The char Type / char类型  50
    3.3.4 Unicode and the char Type / Unicode与char类型  51
    3.3.5 The boolean Type / boolean类型  52
    3.4 Variables / 变量  53
    3.4.1 Initializing Variables / 初始化变量  54
    3.4.2 Constants / 常量  55
    3.5 Operators / 运算符  56
    3.5.1 Mathematical Functions and Constants / 数学函数与常量  57
    3.5.2 Conversions between Numeric Types / 数值类型之间的转换  59
    3.5.3 Casts / 强制类型转换  60
    3.5.4 Combining Assignment with Operators / 组合赋值运算符  61
    3.5.5 Increment and Decrement Operators / 自增运算符与自减运算符  61
    3.5.6 Relational and Boolean Operators / 关系与boolean运算符  62
    3.5.7 Bitwise Operators / 位运算符  63
    3.5.8 Parentheses and Operator Hierarchy / 括号与运算符优先级  64
    3.5.9 Enumerated Types / 枚举类型  65
    3.6 Strings / 字符串  65
    3.6.1 Substrings / 子串  66
    3.6.2 Concatenation / 拼接  66
    3.6.3 Strings Are Immutable / String是不可变的  67
    3.6.4 Testing Strings for Equality / 测试字符串是否相等  68
    3.6.5 Empty and Null Strings / 空串与null串  69
    3.6.6 Code Points and Code Units / 码位与编码单元  70
    3.6.7 The String API / String 类的API  71
    3.6.8 Reading the Online API Documentation / 阅读在线API文档  74
    3.6.9 Building Strings / 构建字符串  77
    3.7 Input and Output / 输入输出  78
    3.7.1 Reading Input / 读取输入  79
    3.7.2 Formatting Output / 格式化输出  82
    3.7.3 File Input and Output / 文件输入输出  87
    3.8 Control Flow / 控制流  89
    3.8.1 Block Scope / 块作用域  89
    3.8.2 Conditional Statements / 条件语句  90
    3.8.3 Loops / 循环  94
    3.8.4 Determinate Loops / 确定性循环  99
    3.8.5 Multiple Selections—The switch Statement / 多重选择:switch语句  103
    3.8.6 Statements That Break Control Flow / 用于跳出控制流的语句  106
    3.9 Big Numbers / 大数  108
    3.10 Arrays / 数组  111
    3.10.1 The “for each” Loop / “for each”循环  113
    3.10.2 Array Initializers and Anonymous Arrays / 数组初始化与匿名数组  114
    3.10.3 Array Copying / 数组复制  114
    3.10.4 Command-Line Parameters / 命令行参数  116
    3.10.5 Array Sorting / 数组排序  117
    3.10.6 Multidimensional Arrays / 多维数组  120
    3.10.7 Ragged Arrays / 不规则数组  124
    Chapter 4: Objects and Classes /对象与类  129
    4.1 Introduction to Object-Oriented Programming / 面向对象编程简介  130
    4.1.1 Classes / 类  131
    4.1.2 Objects / 对象  132
    4.1.3 Identifying Classes / 识别类  133
    4.1.4 Relationships between Classes / 类之间的关系  133
    4.2 Using Predefined Classes / 使用预定义类  135
    4.2.1 Objects and Object Variables / 对象与对象变量  136
    4.2.2 The LocalDate Class of the Java Library / Java 库中的LocalDate类  139
    4.2.3 Mutator and Accessor Methods / 更改器方法与访问器方法  141
    4.3 Defining Your Own Classes / 定义自己的类  145
    4.3.1 An Employee Class / Employee类  145
    4.3.2 Use of Multiple Source Files / 使用多个源文件  149
    4.3.3 Dissecting the Employee Class / 分析Employee类  149
    4.3.4 First Steps with Constructors / 从构造器开始  150
    4.3.5 Implicit and Explicit Parameters / 隐式参数与显式参数  152
    4.3.6 Benefits of Encapsulation / 封装的好处  153
    4.3.7 Class-Based Access Privileges / 基于类的访问权限  156
    4.3.8 Private Methods / 私有方法  156
    4.3.9 Final Instance Fields / final实例字段  157
    4.4 Static Fields and Methods / 静态字段与静态方法  158
    4.4.1 Static Fields / 静态字段  158
    4.4.2 Static Constants / 静态常量  159
    4.4.3 Static Methods / 静态方法  160
    4.4.4 Factory Methods / 工厂方法  161
    4.4.5 The main Method / main方法  161
    4.5 Method Parameters / 方法参数  164
    4.6 Object Construction / 对象构建  171
    4.6.1 Overloading / 重载  172
    4.6.2 Default Field Initialization / 默认字段初始化  172
    4.6.3 The Constructor with No Arguments / 无参构造器  173
    4.6.4 Explicit Field Initialization / 显式字段初始化  174
    4.6.5 Parameter Names / 参数名  175
    4.6.6 Calling Another Constructor / 调用另一个构造器  176
    4.6.7 Initialization Blocks / 初始化块  177
    4.6.8 Object Destruction and the finalize Method / 对象析构与finalize方法  181
    4.7 Packages / 包  182
    4.7.1 Class Importation / 导入类  183
    4.7.2 Static Imports / 静态导入  185
    4.7.3 Addition of a Class into a Package / 将类添加到某个包中  185
    4.7.4 Package Scope / 包作用域  189
    4.8 The Class Path / 类路径  190
    4.8.1 Setting the Class Path / 设置类路径  193
    4.9 Documentation Comments / 文档注释  194
    4.9.1 Comment Insertion / 插入注释  194
    4.9.2 Class Comments / 类注释  195
    4.9.3 Method Comments / 方法注释  195
    4.9.4 Field Comments / 字段注释  196
    4.9.5 General Comments / 通用注释  196
    4.9.6 Package and Overview Comments / 包与概述注释  198
    4.9.7 Comment Extraction / 提取注释  198
    4.10 Class Design Hints / 类设计建议  200
    Chapter 5: Inheritance / 继承  203
    5.1 Classes, Superclasses, and Subclasses / 类、超类与子类  204
    5.1.1 Defining Subclasses / 定义子类  204
    5.1.2 Overriding Methods / 覆盖方法  206
    5.1.3 Subclass Constructors / 子类构造器  207
    5.1.4 Inheritance Hierarchies / 继承层次  212
    5.1.5 Polymorphism / 多态  213
    5.1.6 Understanding Method Calls / 理解方法调用  214
    5.1.7 Preventing Inheritance: Final Classes and Methods / 阻止继承:final修饰的类和方法  217
    5.1.8 Casting / 强制类型转换  219
    5.1.9 Abstract Classes / 抽象类  221
    5.1.10 Protected Access / 受保护访问  227
    5.2 Object: The Cosmic Superclass / Object:所有类的超类  228
    5.2.1 The equals Method / equals方法  229
    5.2.2 Equality Testing and Inheritance / 相等测试与继承  231
    5.2.3 The hashCode Method / hashCode方法  235
    5.2.4 The toString Method / toString方法  238
    5.3 Generic Array Lists / 泛型数组列表  244
    5.3.1 Accessing Array List Elements / 访问泛型数组列表的元素  247
    5.3.2 Compatibility between Typed and Raw Array Lists / 泛型数组列表与原始数组列表的兼容性  251
    5.4 Object Wrappers and Autoboxing / 对象包装器与自动装箱  252
    5.5 Methods with a Variable Number of Parameters / 参数数量可变的方法  256
    5.6 Enumeration Classes / 枚举类  258
    5.7 Reflection / 反射  260
    5.7.1 The Class Class / Class类  261
    5.7.2 A Primer on Catching Exceptions / 捕获异常简介  263
    5.7.3 Using Reflection to Analyze the Capabilities of Classes / 使用反射分析类的能力  265
    5.7.4 Using Reflection to Analyze Objects at Runtime / 在运行时使用反射分析对象  271
    5.7.5 Using Reflection to Write Generic Array Code / 使用反射编写泛型数组代码  276
    5.7.6 Invoking Arbitrary Methods / 调用任意方法  279
    5.8 Design Hints for Inheritance / 继承的设计建议  283
    Chapter 6: Interfaces, Lambda Expressions, and Inner Classes / 接口、Lambda表达式和内部类  287
    6.1 Interfaces / 接口  288
    6.1.1 The Interface Concept / 接口的概念  288
    6.1.2 Properties of Interfaces / 接口的特性  295
    6.1.3 Interfaces and Abstract Classes / 接口与抽象类  297
    6.1.4 Static Methods / 静态方法  298
    6.1.5 Default Methods / 默认方法  298
    6.1.6 Resolving Default Method Conflicts / 解决默认方法的冲突  300
    6.2 Examples of Interfaces / 接口示例  302
    6.2.1 Interfaces and Callbacks / 接口与回调  302
    6.2.2 The Comparator Interface / Comparator接口  305
    6.2.3 Object Cloning / 对象克隆  306
    6.3 Lambda Expressions / Lambda表达式  314
    6.3.1 Why Lambdas? / 为什么引入Lambda表达式  314
    6.3.2 The Syntax of Lambda Expressions / Lambda表达式的语法  315
    6.3.3 Functional Interfaces / 函数式接口  318
    6.3.4 Method References / 方法引用  319
    6.3.5 Constructor References / 构造器引用  321
    6.3.6 Variable Scope / 变量作用域  322
    6.3.7 Processing Lambda Expressions / 处理Lambda表达式  324
    6.3.8 More about Comparators / 再谈Comparator  328
    6.4 Inner Classes / 内部类  329
    6.4.1 Use of an Inner Class to Access Object State / 使用内部类访问对象状态  331
    6.4.2 Special Syntax Rules for Inner Classes / 
    内部类的特殊语法规则  334
    6.4.3 Are Inner Classes Useful? Actually Necessary? Secure? / 内部类是否有用、必要和安全  335
    6.4.4 Local Inner Classes / 局部内部类  339
    6.4.5 Accessing Variables from Outer Methods / 从外部方法访问变量  339
    6.4.6 Anonymous Inner Classes / 匿名内部类  342
    6.4.7 Static Inner Classes / 静态内部类  346
    6.5 Proxies / 代理  350
    6.5.1 When to Use Proxies / 何时使用代理  350
    6.5.2 Creating Proxy Objects / 创建代理对象  350
    6.5.3 Properties of Proxy Classes / 代理类的特性  355
    Chapter 7: Exceptions, Assertions, and Logging /异常、断言与日志  357
    7.1 Dealing with Errors / 处理错误  358
    7.1.1 The Classification of Exceptions / 异常分类  359
    7.1.2 Declaring Checked Exceptions / 声明检查型异常  361
    7.1.3 How to Throw an Exception / 如何抛出异常  364
    7.1.4 Creating Exception Classes / 创建异常类  365
    7.2 Catching Exceptions / 捕获异常  367
    7.2.1 Catching an Exception / 捕获一个异常  367
    7.2.2 Catching Multiple Exceptions / 捕获多个异常  369
    7.2.3 Rethrowing and Chaining Exceptions / 再次抛出异常与异常链  370
    7.2.4 The finally Clause / finally子句  372
    7.2.5 The Try-with-Resources Statement / try-with-resources语句  376
    7.2.6 Analyzing Stack Trace Elements / 分析栈轨迹元素  377
    7.3 Tips for Using Exceptions / 异常使用技巧  381
    7.4 Using Assertions / 使用断言  384
    7.4.1 The Assertion Concept / 断言的概念  384
    7.4.2 Assertion Enabling and Disabling / 启用和禁用断言  385
    7.4.3 Using Assertions for Parameter Checking / 使用断言检查参数  386
    7.4.4 Using Assertions for Documenting Assumptions / 使用断言保证文档中假定成立的条件  387
    7.5 Logging / 日志  389
    7.5.1 Basic Logging / 基本日志  389
    7.5.2 Advanced Logging / 高级日志  390
    7.5.3 Changing the Log Manager Configuration / 修改日志管理器配置  392
    7.5.4 Localization / 本地化  393
    7.5.5 Handlers / 处理器  394
    7.5.6 Filters / 过滤器  398
    7.5.7 Formatters / 格式化器  399
    7.5.8 A Logging Recipe / 常见日志操作总结  399
    7.6 Debugging Tips / 调试技巧  409
    Chapter 8: Generic Programming /泛型编程  415
    8.1 Why Generic Programming? / 为什么要使用泛型编程  416
    8.1.1 The Advantage of Type Parameters / 类型参数的好处  416
    8.1.2 Who Wants to Be a Generic Programmer? / 哪些人想成为泛型程序员  417
    8.2 Defining a Simple Generic Class / 定义简单的泛型类  418
    8.3 Generic Methods / 泛型方法  421
    8.4 Bounds for Type Variables / 类型变量的绑定  422
    8.5 Generic Code and the Virtual Machine / 泛型代码与虚拟机  425
    8.5.1 Type Erasure / 类型擦除  425
    8.5.2 Translating Generic Expressions / 翻译泛型表达式  426
    8.5.3 Translating Generic Methods / 翻译泛型方法  427
    8.5.4 Calling Legacy Code / 调用遗留代码  429
    8.6 Restrictions and Limitations / 约束与局限性  430
    8.6.1 Type Parameters Cannot Be Instantiated with Primitive Types / 类型参数不能用基本类型来实例化  430
    8.6.2 Runtime Type Inquiry Only Works with Raw Types / 运行时类型查询只适用于原始类型  431
    8.6.3 You Cannot Create Arrays of Parameterized Types / 不能创建参数化类型的数组  431
    8.6.4 Varargs Warnings / 注意变长参数情况  432
    8.6.5 You Cannot Instantiate Type Variables / 不能实例化类型变量   433
    8.6.6 You Cannot Construct a Generic Array / 不能构造泛型数组  434
    8.6.7 Type Variables Are Not Valid in Static Contexts of Generic Classes / 类型变量在泛型类的静态上下文中无效  436
    8.6.8 You Cannot Throw or Catch Instances of a Generic Class / 不能抛出或捕获泛型类的实例  436
    8.6.9 You Can Defeat Checked Exception Checking / 可以打破“检查型异常必须检查”的规则  437
    8.6.10 Beware of Clashes after Erasure / 注意类型擦除后的冲突  439
    8.7 Inheritance Rules for Generic Types / 泛型类型的继承规则  440
    8.8 Wildcard Types / 通配符类型  442
    8.8.1 The Wildcard Concept / 通配符的概念  442
    8.8.2 Supertype Bounds for Wildcards / 通配符的超类型限定  444
    8.8.3 Unbounded Wildcards / 无限定通配符  447
    8.8.4 Wildcard Capture / 通配符捕获  448
    8.9 Reflection and Generics / 反射与泛型  450
    8.9.1 The Generic Class Class / 泛型的Class类  450
    8.9.2 Using Class Parameters for Type Matching / 使用Class参数进行类型匹配  452
    8.9.3 Generic Type Information in the Virtual Machine / 虚拟机中的泛型类型信息  452
    Chapter 9: Collections /集合类  459
    9.1 The Java Collections Framework / Java 集合类框架  460
    9.1.1 Separating Collection Interfaces and Implementation / 将集合类的接口与实现分离  460
    9.1.2 The Collection Interface / Collection接口  463
    9.1.3 Iterators / 迭代器  463
    9.1.4 Generic Utility Methods / 泛型的实用方法  466
    9.1.5 Interfaces in the Collections Framework / 集合类框架中的接口  469
    9.2 Concrete Collections / 具体的集合类  472
    9.2.1 Linked Lists / 链表  474
    9.2.2 Array Lists / 数组列表  484
    9.2.3 Hash Sets / 散列集  485
    9.2.4 Tree Sets / 树形集  489
    9.2.5 Queues and Deques / 队列与双端队列  494
    9.2.6 Priority Queues / 优先级队列  495
    9.3 Maps / 映射  497
    9.3.1 Basic Map Operations / 基本映射操作  497
    9.3.2 Updating Map Entries / 更新映射表项  500
    9.3.3 Map Views / 映射视图  502
    9.3.4 Weak Hash Maps / 弱散列映射  504
    9.3.5 Linked Hash Sets and Maps / LinkedHashSet与LinkedHashMap  504
    9.3.6 Enumeration Sets and Maps / EnumSet与EnumMap  506
    9.3.7 Identity Hash Maps / IdentityHashMap  507
    9.4 Views and Wrappers / 视图与包装器  509
    9.4.1 Lightweight Collection Wrappers / 轻量级集合包装器  509
    9.4.2 Subranges / 子范围  510
    9.4.3 Unmodifiable Views / 不可修改视图  511
    9.4.4 Synchronized Views / 同步视图  512
    9.4.5 Checked Views / 检查用视图  513
    9.4.6 A Note on Optional Operations / 可选操作说明  514
    9.5 Algorithms / 算法  517
    9.5.1 Sorting and Shuffiing / 排序与混排  518
    9.5.2 Binary Search / 二分查找  521
    9.5.3 Simple Algorithms / 简单算法  522
    9.5.4 Bulk Operations / 主要操作  524
    9.5.5 Converting between Collections and Arrays / 集合与数组之间的转换  525
    9.5.6 Writing Your Own Algorithms / 编写自己的算法  526
    9.6 Legacy Collections / 遗留的集合类  528
    9.6.1 The Hashtable Class / Hashtable类  528
    9.6.2 Enumerations / Enumeration  528
    9.6.3 Property Maps / 属性映射  530
    9.6.4 Stacks / 栈  531
    9.6.5 Bit Sets / 位集  532
    Chapter 10: Graphics Programming /图形界面编程  537
    10.1 Introducing Swing / Swing简介  538
    10.2 Creating a Frame / 创建框架  543
    10.3 Positioning a Frame / 设定框架的显示位置  546
    10.3.1 Frame Properties / 框架属性  549
    10.3.2 Determining a Good Frame Size / 确定合适的框架大小  549
    10.4 Displaying Information in a Component / 在组件中显示信息  554
    10.5 Working with 2D Shapes / 处理2D图形  560
    10.6 Using Color / 使用颜色  569
    10.7 Using Special Fonts for Text / 使用特殊的文本字体  573
    10.8 Displaying Images / 显示图片  582
    Chapter 11: Event Handling /事件处理  587
    11.1 Basics of Event Handling / 事件处理基础  587
    11.1.1 Example: Handling a Button Click / 示例:处理按钮点击事件  591
    11.1.2 Specifying Listeners Concisely / 设置监听器的简洁方法  595
    11.1.3 Example: Changing the Look-and-Feel / 示例:修改观感  598
    11.1.4 Adapter Classes / 适配器类  603
    11.2 Actions / 动作  607
    11.3 Mouse Events / 鼠标事件  616
    11.4 The AWT Event Hierarchy / AWT事件层次  624
    11.4.1 Semantic and Low-Level Events / 语义与底层事件  626
    Chapter 12: User Interface Components with Swing / Swing用户界面组件  629
    12.1 Swing and the Model-View-Controller Design Pattern / Swing与模型-视图-控制器设计模式  630
    12.1.1 Design Patterns / 设计模式  630
    12.1.2 The Model-View-Controller Pattern / 模型-视图-控制器模式  632
    12.1.3 A Model-View-Controller Analysis of Swing Buttons / Swing按钮的模型-视图-控制器分析  636
    12.2 Introduction to Layout Management / 布局管理简介  638
    12.2.1 Border Layout / 边框布局  641
    12.2.2 Grid Layout / 网格布局  644
    12.3 Text Input / 文本输入  648
    12.3.1 Text Fields / 文本框  649
    12.3.2 Labels and Labeling Components / 标签与标签组件  651
    12.3.3 Password Fields / 密码框  652
    12.3.4 Text Areas / 文本区域  653
    12.3.5 Scroll Panes / 滚动窗格  654
    12.4 Choice Components / 选择组件  657
    12.4.1 Checkboxes / 复选框  657
    12.4.2 Radio Buttons / 单选按钮  660
    12.4.3 Borders / 边框  664
    12.4.4 Combo Boxes / 组合框  668
    12.4.5 Sliders / 滑动条  672
    12.5 Menus / 菜单  678
    12.5.1 Menu Building / 菜单构建  679
    12.5.2 Icons in Menu Items / 菜单项中的图标  682
    12.5.3 Checkbox and Radio Button Menu Items / 复选框和单选按钮菜单项  683
    12.5.4 Pop-Up Menus / 弹出菜单  684
    12.5.5 Keyboard Mnemonics and Accelerators / 键盘助记符与快捷键  686
    12.5.6 Enabling and Disabling Menu Items / 启用和禁用菜单项  689
    12.5.7 Toolbars / 工具栏  694
    12.5.8 Tooltips / 工具提示  696
    12.6 Sophisticated Layout Management / 复杂的布局管理  699
    12.6.1 The Grid Bag Layout / 网格布局管理  701
    12.6.2 Group Layout / 组布局  713
    12.6.3 Using No Layout Manager / 不使用布局管理器  723
    12.6.4 Custom Layout Managers / 定制布局管理器  724
    12.6.5 Traversal Order / 遍历顺序  729
    12.7 Dialog Boxes / 对话框  730
    12.7.1 Option Dialogs / 选项对话框  731
    12.7.2 Creating Dialogs / 创建对话框  741
    12.7.3 Data Exchange / 数据交换  746
    12.7.4 File Dialogs / 文件对话框  752
    12.7.5 Color Choosers / 颜色选择器  764
    12.8 Troubleshooting GUI Programs / GUI程序的问题定位  770
    12.8.1 Debugging Tips / 调试技巧  770
    12.8.2 Letting the AWT Robot Do the Work / 把工作交给AWT Robot  774
    Chapter 13: Deploying Java Applications / 部署Java应用程序  779
    13.1 JAR Files / JAR文件  780
    13.1.1 Creating JARfiles / 创建JAR文件  780
    13.1.2 The Manifest / 清单文件  781
    13.1.3 Executable JAR Files / 可执行的JAR文件  782
    13.1.4 Resources / 资源  783
    13.1.5 Sealing / 封闭  787
    13.2 Storage of Application Preferences / 应用偏好信息的存储  788
    13.2.1 Property Maps / 属性映射  788
    13.2.2 The Preferences API / Properties API  794
    13.3 Service Loaders / 服务加载器  800
    13.4 Applets / Applet  802
    13.4.1 A Simple Applet / 一个简单的Applet  803
    13.4.2 The applet HTML Tag and Its Attributes / applet HTML标记及其属性  808
    13.4.3 Use of Parameters to Pass Information to Applets / 使用参数向Applet传递信息  810
    13.4.4 Accessing Image and Audio Files / 访问图片和音频文件  816
    13.4.5 The Applet Context / Applet上下文  818
    13.4.6 Inter-Applet Communication / Applet间的通信  818
    13.4.7 Displaying Items in the Browser / 在浏览器中显示信息  819
    13.4.8 The Sandbox / 沙箱  820
    13.4.9 Signed Code / 签名代码  822
    13.5 Java Web Start / Java Web Start  824
    13.5.1 Delivering a Java Web Start Application / 交付一个Java Web Start应用  824
    13.5.2 The JNLP API / JNLP API  829
    Chapter 14: Concurrency /并发  839
    14.1 What Are Threads? / 什么是线程  840
    14.1.1 Using Threads to Give Other Tasks a Chance / 使用线程为其他任务提供执行机会  846
    14.2 Interrupting Threads / 中断线程  851
    14.3 Thread States / 线程状态  855
    14.3.1 New Threads / 新创建线程  855
    14.3.2 Runnable Threads / 可运行线程  855
    14.3.3 Blocked and Waiting Threads / 被阻塞线程与等待线程  856
    14.3.4 Terminated Threads / 被终止的线程  857
    14.4 Thread Properties / 线程属性  858
    14.4.1 Thread Priorities / 线程优先级  858
    14.4.2 Daemon Threads / 守护线程  859
    14.4.3 Handlers for Uncaught Exceptions / 未捕获异常的处理器  860
    14.5 Synchronization / 同步  862
    14.5.1 An Example of a Race Condition / 竞争条件的一个案例  862
    14.5.2 The Race Condition Explained / 竞争条件详解  866
    14.5.3 Lock Objects / 锁对象  868
    14.5.4 Condition Objects / 条件对象  872
    14.5.5 The synchronized Keyword / synchronized关键字  878
    14.5.6 Synchronized Blocks / 同步块  882
    14.5.7 The Monitor Concept / 监视器概念  884
    14.5.8 Volatile Fields / volatile字段  885
    14.5.9 Final Variables / final变量  886
    14.5.10 Atomics / 原子  886
    14.5.11 Deadlocks / 死锁  889
    14.5.12 Thread-Local Variables / 线程局部变量  892
    14.5.13 Lock Testing and Timeouts / 锁测试与超时  893
    14.5.14 Read / Write Locks / 读/写锁  895
    14.5.15 Why the stop and suspend Methods Are Deprecated / 为什么弃用stop和suspend方法  896
    14.6 Blocking Queues / 阻塞队列  898
    14.7 Thread-Safe Collections / 线程安全的集合  905
    14.7.1 Efficient Maps, Sets, and Queues / 高效的映射、集和队列  905
    14.7.2 Atomic Update of Map Entries / 映射表项的原子更新  907
    14.7.3 Bulk Operations on Concurrent Hash Maps / 并发散列映射上的主要操作  909
    14.7.4 Concurrent Set Views / 并发的集视图  912
    14.7.5 Copy on Write Arrays / 写时复制的数组  912
    14.7.6 Parallel Array Algorithms / 并行数组算法  912
    14.7.7 Older Thread-Safe Collections / 较早的线程安全的集合  914
    14.8 Callables and Futures / Callable与Future  915
    14.9 Executors / 执行器  920
    14.9.1 Thread Pools / 线程池  921
    14.9.2 Scheduled Execution / 预订执行  926
    14.9.3 Controlling Groups of Tasks / 控制任务组  927
    14.9.4 The Fork-Join Framework / Fork-Join框架  928
    14.9.5 Completable Futures / CompletableFuture  931
    14.10 Synchronizers / 同步器  934
    14.10.1 Semaphores / 信号量  935
    14.10.2 Countdown Latches / 倒计时门栓  936
    14.10.3 Barriers / 障栅  936
    14.10.4 Exchangers / 交换器  937
    14.10.5 Synchronous Queues / 同步队列  937
    14.11 Threads and Swing / 线程与Swing  937
    14.11.1 Running Time-Consuming Tasks / 运行耗时任务  939
    14.11.2 Using the Swing Worker / 使用Swing工作线程  943
    14.11.3 The Single-Thread Rule / 单线程规则  951
    Appendix / 附录  953
  • 内容简介:
    本书是经典的《Java核心技术 卷I:基础知识》的新版。这一版针对Java SE 8平台进行了全面更新,以反映Java SE 8的特性。
    书中囊括了Java的全部基础知识,提供了大量完整且具有实际意义的应用示例,详细介绍了Java语言基础、面向对象编程、反射与代理、接口与内部类、事件监听器模型、使用Swing GUI工具进行图形用户界面程序设计、打包应用程序、异常处理、登录与调试、泛型编程、集合框架、多线程、并发等内容。
  • 作者简介:
    Cay S. Horstmann 是Scala for the Impatient的作者,还与人合著了Core JavaServer Faces。他是圣何塞州立大学计算机科学专业的教授,还是一名Java Champion,并经常在很多开发者大会上演讲。
  • 目录:
    目录

    Chapter 1: An Introduction to Java / Java概述  1
    1.1 Java as a Programming Platform / Java程序设计平台  1
    1.2 The Java“White Paper”Buzzwords / Java“白皮书”中的口号  2
    1.2.1 Simple / 简单  3
    1.2.2 Object-Oriented / 面向对象  4
    1.2.3 Distributed / 分布式  4
    1.2.4 Robust / 健壮  4
    1.2.5 Secure / 安全  4
    1.2.6 Architecture-Neutral / 体系结构中立  5
    1.2.7 Portable / 可移植  6
    1.2.8 Interpreted / 解释型  7
    1.2.9 High-Performance / 高性能  7
    1.2.10 Multithreaded / 多线程  7
    1.2.11 Dynamic / 动态  8
    1.3 Java Applets and the Internet / Java Applet与Internet  8
    1.4 A Short History of Java / Java简史  10
    1.5 Common Misconceptions about Java / 对Java的常见误解  13
    Chapter 2: The Java Programming Environment / Java编程环境  17
    2.1 Installing the Java Development Kit / 安装Java开发包(JDK)  18
    2.1.1 Downloading the JDK / 下载JDK  18
    2.1.2 Setting up the JDK / 设置JDK  20
    2.1.3 Installing Source Files and Documentation /源文件与文档的下载与设置  22
    2.2 Using the Command-Line Tools / 使用命令行工具  23
    2.3 Using an Integrated Development Environment / 使用集成开发环境  26
    2.4 Running a Graphical Application / 运行图形化应用程序  30
    2.5 Building and Running Applets / 构建并运行Applet  33
    Chapter 3: Fundamental Programming Structures in Java / Java的基本编程结构  41
    3.1 A Simple Java Program / 一个简单的Java程序  42
    3.2 Comments / 注释  46
    3.3 Data Types / 数据类型  47
    3.3.1 Integer Types / 整型  47
    3.3.2 Floating-Point Types / 浮点型  48
    3.3.3 The char Type / char类型  50
    3.3.4 Unicode and the char Type / Unicode与char类型  51
    3.3.5 The boolean Type / boolean类型  52
    3.4 Variables / 变量  53
    3.4.1 Initializing Variables / 初始化变量  54
    3.4.2 Constants / 常量  55
    3.5 Operators / 运算符  56
    3.5.1 Mathematical Functions and Constants / 数学函数与常量  57
    3.5.2 Conversions between Numeric Types / 数值类型之间的转换  59
    3.5.3 Casts / 强制类型转换  60
    3.5.4 Combining Assignment with Operators / 组合赋值运算符  61
    3.5.5 Increment and Decrement Operators / 自增运算符与自减运算符  61
    3.5.6 Relational and Boolean Operators / 关系与boolean运算符  62
    3.5.7 Bitwise Operators / 位运算符  63
    3.5.8 Parentheses and Operator Hierarchy / 括号与运算符优先级  64
    3.5.9 Enumerated Types / 枚举类型  65
    3.6 Strings / 字符串  65
    3.6.1 Substrings / 子串  66
    3.6.2 Concatenation / 拼接  66
    3.6.3 Strings Are Immutable / String是不可变的  67
    3.6.4 Testing Strings for Equality / 测试字符串是否相等  68
    3.6.5 Empty and Null Strings / 空串与null串  69
    3.6.6 Code Points and Code Units / 码位与编码单元  70
    3.6.7 The String API / String 类的API  71
    3.6.8 Reading the Online API Documentation / 阅读在线API文档  74
    3.6.9 Building Strings / 构建字符串  77
    3.7 Input and Output / 输入输出  78
    3.7.1 Reading Input / 读取输入  79
    3.7.2 Formatting Output / 格式化输出  82
    3.7.3 File Input and Output / 文件输入输出  87
    3.8 Control Flow / 控制流  89
    3.8.1 Block Scope / 块作用域  89
    3.8.2 Conditional Statements / 条件语句  90
    3.8.3 Loops / 循环  94
    3.8.4 Determinate Loops / 确定性循环  99
    3.8.5 Multiple Selections—The switch Statement / 多重选择:switch语句  103
    3.8.6 Statements That Break Control Flow / 用于跳出控制流的语句  106
    3.9 Big Numbers / 大数  108
    3.10 Arrays / 数组  111
    3.10.1 The “for each” Loop / “for each”循环  113
    3.10.2 Array Initializers and Anonymous Arrays / 数组初始化与匿名数组  114
    3.10.3 Array Copying / 数组复制  114
    3.10.4 Command-Line Parameters / 命令行参数  116
    3.10.5 Array Sorting / 数组排序  117
    3.10.6 Multidimensional Arrays / 多维数组  120
    3.10.7 Ragged Arrays / 不规则数组  124
    Chapter 4: Objects and Classes /对象与类  129
    4.1 Introduction to Object-Oriented Programming / 面向对象编程简介  130
    4.1.1 Classes / 类  131
    4.1.2 Objects / 对象  132
    4.1.3 Identifying Classes / 识别类  133
    4.1.4 Relationships between Classes / 类之间的关系  133
    4.2 Using Predefined Classes / 使用预定义类  135
    4.2.1 Objects and Object Variables / 对象与对象变量  136
    4.2.2 The LocalDate Class of the Java Library / Java 库中的LocalDate类  139
    4.2.3 Mutator and Accessor Methods / 更改器方法与访问器方法  141
    4.3 Defining Your Own Classes / 定义自己的类  145
    4.3.1 An Employee Class / Employee类  145
    4.3.2 Use of Multiple Source Files / 使用多个源文件  149
    4.3.3 Dissecting the Employee Class / 分析Employee类  149
    4.3.4 First Steps with Constructors / 从构造器开始  150
    4.3.5 Implicit and Explicit Parameters / 隐式参数与显式参数  152
    4.3.6 Benefits of Encapsulation / 封装的好处  153
    4.3.7 Class-Based Access Privileges / 基于类的访问权限  156
    4.3.8 Private Methods / 私有方法  156
    4.3.9 Final Instance Fields / final实例字段  157
    4.4 Static Fields and Methods / 静态字段与静态方法  158
    4.4.1 Static Fields / 静态字段  158
    4.4.2 Static Constants / 静态常量  159
    4.4.3 Static Methods / 静态方法  160
    4.4.4 Factory Methods / 工厂方法  161
    4.4.5 The main Method / main方法  161
    4.5 Method Parameters / 方法参数  164
    4.6 Object Construction / 对象构建  171
    4.6.1 Overloading / 重载  172
    4.6.2 Default Field Initialization / 默认字段初始化  172
    4.6.3 The Constructor with No Arguments / 无参构造器  173
    4.6.4 Explicit Field Initialization / 显式字段初始化  174
    4.6.5 Parameter Names / 参数名  175
    4.6.6 Calling Another Constructor / 调用另一个构造器  176
    4.6.7 Initialization Blocks / 初始化块  177
    4.6.8 Object Destruction and the finalize Method / 对象析构与finalize方法  181
    4.7 Packages / 包  182
    4.7.1 Class Importation / 导入类  183
    4.7.2 Static Imports / 静态导入  185
    4.7.3 Addition of a Class into a Package / 将类添加到某个包中  185
    4.7.4 Package Scope / 包作用域  189
    4.8 The Class Path / 类路径  190
    4.8.1 Setting the Class Path / 设置类路径  193
    4.9 Documentation Comments / 文档注释  194
    4.9.1 Comment Insertion / 插入注释  194
    4.9.2 Class Comments / 类注释  195
    4.9.3 Method Comments / 方法注释  195
    4.9.4 Field Comments / 字段注释  196
    4.9.5 General Comments / 通用注释  196
    4.9.6 Package and Overview Comments / 包与概述注释  198
    4.9.7 Comment Extraction / 提取注释  198
    4.10 Class Design Hints / 类设计建议  200
    Chapter 5: Inheritance / 继承  203
    5.1 Classes, Superclasses, and Subclasses / 类、超类与子类  204
    5.1.1 Defining Subclasses / 定义子类  204
    5.1.2 Overriding Methods / 覆盖方法  206
    5.1.3 Subclass Constructors / 子类构造器  207
    5.1.4 Inheritance Hierarchies / 继承层次  212
    5.1.5 Polymorphism / 多态  213
    5.1.6 Understanding Method Calls / 理解方法调用  214
    5.1.7 Preventing Inheritance: Final Classes and Methods / 阻止继承:final修饰的类和方法  217
    5.1.8 Casting / 强制类型转换  219
    5.1.9 Abstract Classes / 抽象类  221
    5.1.10 Protected Access / 受保护访问  227
    5.2 Object: The Cosmic Superclass / Object:所有类的超类  228
    5.2.1 The equals Method / equals方法  229
    5.2.2 Equality Testing and Inheritance / 相等测试与继承  231
    5.2.3 The hashCode Method / hashCode方法  235
    5.2.4 The toString Method / toString方法  238
    5.3 Generic Array Lists / 泛型数组列表  244
    5.3.1 Accessing Array List Elements / 访问泛型数组列表的元素  247
    5.3.2 Compatibility between Typed and Raw Array Lists / 泛型数组列表与原始数组列表的兼容性  251
    5.4 Object Wrappers and Autoboxing / 对象包装器与自动装箱  252
    5.5 Methods with a Variable Number of Parameters / 参数数量可变的方法  256
    5.6 Enumeration Classes / 枚举类  258
    5.7 Reflection / 反射  260
    5.7.1 The Class Class / Class类  261
    5.7.2 A Primer on Catching Exceptions / 捕获异常简介  263
    5.7.3 Using Reflection to Analyze the Capabilities of Classes / 使用反射分析类的能力  265
    5.7.4 Using Reflection to Analyze Objects at Runtime / 在运行时使用反射分析对象  271
    5.7.5 Using Reflection to Write Generic Array Code / 使用反射编写泛型数组代码  276
    5.7.6 Invoking Arbitrary Methods / 调用任意方法  279
    5.8 Design Hints for Inheritance / 继承的设计建议  283
    Chapter 6: Interfaces, Lambda Expressions, and Inner Classes / 接口、Lambda表达式和内部类  287
    6.1 Interfaces / 接口  288
    6.1.1 The Interface Concept / 接口的概念  288
    6.1.2 Properties of Interfaces / 接口的特性  295
    6.1.3 Interfaces and Abstract Classes / 接口与抽象类  297
    6.1.4 Static Methods / 静态方法  298
    6.1.5 Default Methods / 默认方法  298
    6.1.6 Resolving Default Method Conflicts / 解决默认方法的冲突  300
    6.2 Examples of Interfaces / 接口示例  302
    6.2.1 Interfaces and Callbacks / 接口与回调  302
    6.2.2 The Comparator Interface / Comparator接口  305
    6.2.3 Object Cloning / 对象克隆  306
    6.3 Lambda Expressions / Lambda表达式  314
    6.3.1 Why Lambdas? / 为什么引入Lambda表达式  314
    6.3.2 The Syntax of Lambda Expressions / Lambda表达式的语法  315
    6.3.3 Functional Interfaces / 函数式接口  318
    6.3.4 Method References / 方法引用  319
    6.3.5 Constructor References / 构造器引用  321
    6.3.6 Variable Scope / 变量作用域  322
    6.3.7 Processing Lambda Expressions / 处理Lambda表达式  324
    6.3.8 More about Comparators / 再谈Comparator  328
    6.4 Inner Classes / 内部类  329
    6.4.1 Use of an Inner Class to Access Object State / 使用内部类访问对象状态  331
    6.4.2 Special Syntax Rules for Inner Classes / 
    内部类的特殊语法规则  334
    6.4.3 Are Inner Classes Useful? Actually Necessary? Secure? / 内部类是否有用、必要和安全  335
    6.4.4 Local Inner Classes / 局部内部类  339
    6.4.5 Accessing Variables from Outer Methods / 从外部方法访问变量  339
    6.4.6 Anonymous Inner Classes / 匿名内部类  342
    6.4.7 Static Inner Classes / 静态内部类  346
    6.5 Proxies / 代理  350
    6.5.1 When to Use Proxies / 何时使用代理  350
    6.5.2 Creating Proxy Objects / 创建代理对象  350
    6.5.3 Properties of Proxy Classes / 代理类的特性  355
    Chapter 7: Exceptions, Assertions, and Logging /异常、断言与日志  357
    7.1 Dealing with Errors / 处理错误  358
    7.1.1 The Classification of Exceptions / 异常分类  359
    7.1.2 Declaring Checked Exceptions / 声明检查型异常  361
    7.1.3 How to Throw an Exception / 如何抛出异常  364
    7.1.4 Creating Exception Classes / 创建异常类  365
    7.2 Catching Exceptions / 捕获异常  367
    7.2.1 Catching an Exception / 捕获一个异常  367
    7.2.2 Catching Multiple Exceptions / 捕获多个异常  369
    7.2.3 Rethrowing and Chaining Exceptions / 再次抛出异常与异常链  370
    7.2.4 The finally Clause / finally子句  372
    7.2.5 The Try-with-Resources Statement / try-with-resources语句  376
    7.2.6 Analyzing Stack Trace Elements / 分析栈轨迹元素  377
    7.3 Tips for Using Exceptions / 异常使用技巧  381
    7.4 Using Assertions / 使用断言  384
    7.4.1 The Assertion Concept / 断言的概念  384
    7.4.2 Assertion Enabling and Disabling / 启用和禁用断言  385
    7.4.3 Using Assertions for Parameter Checking / 使用断言检查参数  386
    7.4.4 Using Assertions for Documenting Assumptions / 使用断言保证文档中假定成立的条件  387
    7.5 Logging / 日志  389
    7.5.1 Basic Logging / 基本日志  389
    7.5.2 Advanced Logging / 高级日志  390
    7.5.3 Changing the Log Manager Configuration / 修改日志管理器配置  392
    7.5.4 Localization / 本地化  393
    7.5.5 Handlers / 处理器  394
    7.5.6 Filters / 过滤器  398
    7.5.7 Formatters / 格式化器  399
    7.5.8 A Logging Recipe / 常见日志操作总结  399
    7.6 Debugging Tips / 调试技巧  409
    Chapter 8: Generic Programming /泛型编程  415
    8.1 Why Generic Programming? / 为什么要使用泛型编程  416
    8.1.1 The Advantage of Type Parameters / 类型参数的好处  416
    8.1.2 Who Wants to Be a Generic Programmer? / 哪些人想成为泛型程序员  417
    8.2 Defining a Simple Generic Class / 定义简单的泛型类  418
    8.3 Generic Methods / 泛型方法  421
    8.4 Bounds for Type Variables / 类型变量的绑定  422
    8.5 Generic Code and the Virtual Machine / 泛型代码与虚拟机  425
    8.5.1 Type Erasure / 类型擦除  425
    8.5.2 Translating Generic Expressions / 翻译泛型表达式  426
    8.5.3 Translating Generic Methods / 翻译泛型方法  427
    8.5.4 Calling Legacy Code / 调用遗留代码  429
    8.6 Restrictions and Limitations / 约束与局限性  430
    8.6.1 Type Parameters Cannot Be Instantiated with Primitive Types / 类型参数不能用基本类型来实例化  430
    8.6.2 Runtime Type Inquiry Only Works with Raw Types / 运行时类型查询只适用于原始类型  431
    8.6.3 You Cannot Create Arrays of Parameterized Types / 不能创建参数化类型的数组  431
    8.6.4 Varargs Warnings / 注意变长参数情况  432
    8.6.5 You Cannot Instantiate Type Variables / 不能实例化类型变量   433
    8.6.6 You Cannot Construct a Generic Array / 不能构造泛型数组  434
    8.6.7 Type Variables Are Not Valid in Static Contexts of Generic Classes / 类型变量在泛型类的静态上下文中无效  436
    8.6.8 You Cannot Throw or Catch Instances of a Generic Class / 不能抛出或捕获泛型类的实例  436
    8.6.9 You Can Defeat Checked Exception Checking / 可以打破“检查型异常必须检查”的规则  437
    8.6.10 Beware of Clashes after Erasure / 注意类型擦除后的冲突  439
    8.7 Inheritance Rules for Generic Types / 泛型类型的继承规则  440
    8.8 Wildcard Types / 通配符类型  442
    8.8.1 The Wildcard Concept / 通配符的概念  442
    8.8.2 Supertype Bounds for Wildcards / 通配符的超类型限定  444
    8.8.3 Unbounded Wildcards / 无限定通配符  447
    8.8.4 Wildcard Capture / 通配符捕获  448
    8.9 Reflection and Generics / 反射与泛型  450
    8.9.1 The Generic Class Class / 泛型的Class类  450
    8.9.2 Using Class Parameters for Type Matching / 使用Class参数进行类型匹配  452
    8.9.3 Generic Type Information in the Virtual Machine / 虚拟机中的泛型类型信息  452
    Chapter 9: Collections /集合类  459
    9.1 The Java Collections Framework / Java 集合类框架  460
    9.1.1 Separating Collection Interfaces and Implementation / 将集合类的接口与实现分离  460
    9.1.2 The Collection Interface / Collection接口  463
    9.1.3 Iterators / 迭代器  463
    9.1.4 Generic Utility Methods / 泛型的实用方法  466
    9.1.5 Interfaces in the Collections Framework / 集合类框架中的接口  469
    9.2 Concrete Collections / 具体的集合类  472
    9.2.1 Linked Lists / 链表  474
    9.2.2 Array Lists / 数组列表  484
    9.2.3 Hash Sets / 散列集  485
    9.2.4 Tree Sets / 树形集  489
    9.2.5 Queues and Deques / 队列与双端队列  494
    9.2.6 Priority Queues / 优先级队列  495
    9.3 Maps / 映射  497
    9.3.1 Basic Map Operations / 基本映射操作  497
    9.3.2 Updating Map Entries / 更新映射表项  500
    9.3.3 Map Views / 映射视图  502
    9.3.4 Weak Hash Maps / 弱散列映射  504
    9.3.5 Linked Hash Sets and Maps / LinkedHashSet与LinkedHashMap  504
    9.3.6 Enumeration Sets and Maps / EnumSet与EnumMap  506
    9.3.7 Identity Hash Maps / IdentityHashMap  507
    9.4 Views and Wrappers / 视图与包装器  509
    9.4.1 Lightweight Collection Wrappers / 轻量级集合包装器  509
    9.4.2 Subranges / 子范围  510
    9.4.3 Unmodifiable Views / 不可修改视图  511
    9.4.4 Synchronized Views / 同步视图  512
    9.4.5 Checked Views / 检查用视图  513
    9.4.6 A Note on Optional Operations / 可选操作说明  514
    9.5 Algorithms / 算法  517
    9.5.1 Sorting and Shuffiing / 排序与混排  518
    9.5.2 Binary Search / 二分查找  521
    9.5.3 Simple Algorithms / 简单算法  522
    9.5.4 Bulk Operations / 主要操作  524
    9.5.5 Converting between Collections and Arrays / 集合与数组之间的转换  525
    9.5.6 Writing Your Own Algorithms / 编写自己的算法  526
    9.6 Legacy Collections / 遗留的集合类  528
    9.6.1 The Hashtable Class / Hashtable类  528
    9.6.2 Enumerations / Enumeration  528
    9.6.3 Property Maps / 属性映射  530
    9.6.4 Stacks / 栈  531
    9.6.5 Bit Sets / 位集  532
    Chapter 10: Graphics Programming /图形界面编程  537
    10.1 Introducing Swing / Swing简介  538
    10.2 Creating a Frame / 创建框架  543
    10.3 Positioning a Frame / 设定框架的显示位置  546
    10.3.1 Frame Properties / 框架属性  549
    10.3.2 Determining a Good Frame Size / 确定合适的框架大小  549
    10.4 Displaying Information in a Component / 在组件中显示信息  554
    10.5 Working with 2D Shapes / 处理2D图形  560
    10.6 Using Color / 使用颜色  569
    10.7 Using Special Fonts for Text / 使用特殊的文本字体  573
    10.8 Displaying Images / 显示图片  582
    Chapter 11: Event Handling /事件处理  587
    11.1 Basics of Event Handling / 事件处理基础  587
    11.1.1 Example: Handling a Button Click / 示例:处理按钮点击事件  591
    11.1.2 Specifying Listeners Concisely / 设置监听器的简洁方法  595
    11.1.3 Example: Changing the Look-and-Feel / 示例:修改观感  598
    11.1.4 Adapter Classes / 适配器类  603
    11.2 Actions / 动作  607
    11.3 Mouse Events / 鼠标事件  616
    11.4 The AWT Event Hierarchy / AWT事件层次  624
    11.4.1 Semantic and Low-Level Events / 语义与底层事件  626
    Chapter 12: User Interface Components with Swing / Swing用户界面组件  629
    12.1 Swing and the Model-View-Controller Design Pattern / Swing与模型-视图-控制器设计模式  630
    12.1.1 Design Patterns / 设计模式  630
    12.1.2 The Model-View-Controller Pattern / 模型-视图-控制器模式  632
    12.1.3 A Model-View-Controller Analysis of Swing Buttons / Swing按钮的模型-视图-控制器分析  636
    12.2 Introduction to Layout Management / 布局管理简介  638
    12.2.1 Border Layout / 边框布局  641
    12.2.2 Grid Layout / 网格布局  644
    12.3 Text Input / 文本输入  648
    12.3.1 Text Fields / 文本框  649
    12.3.2 Labels and Labeling Components / 标签与标签组件  651
    12.3.3 Password Fields / 密码框  652
    12.3.4 Text Areas / 文本区域  653
    12.3.5 Scroll Panes / 滚动窗格  654
    12.4 Choice Components / 选择组件  657
    12.4.1 Checkboxes / 复选框  657
    12.4.2 Radio Buttons / 单选按钮  660
    12.4.3 Borders / 边框  664
    12.4.4 Combo Boxes / 组合框  668
    12.4.5 Sliders / 滑动条  672
    12.5 Menus / 菜单  678
    12.5.1 Menu Building / 菜单构建  679
    12.5.2 Icons in Menu Items / 菜单项中的图标  682
    12.5.3 Checkbox and Radio Button Menu Items / 复选框和单选按钮菜单项  683
    12.5.4 Pop-Up Menus / 弹出菜单  684
    12.5.5 Keyboard Mnemonics and Accelerators / 键盘助记符与快捷键  686
    12.5.6 Enabling and Disabling Menu Items / 启用和禁用菜单项  689
    12.5.7 Toolbars / 工具栏  694
    12.5.8 Tooltips / 工具提示  696
    12.6 Sophisticated Layout Management / 复杂的布局管理  699
    12.6.1 The Grid Bag Layout / 网格布局管理  701
    12.6.2 Group Layout / 组布局  713
    12.6.3 Using No Layout Manager / 不使用布局管理器  723
    12.6.4 Custom Layout Managers / 定制布局管理器  724
    12.6.5 Traversal Order / 遍历顺序  729
    12.7 Dialog Boxes / 对话框  730
    12.7.1 Option Dialogs / 选项对话框  731
    12.7.2 Creating Dialogs / 创建对话框  741
    12.7.3 Data Exchange / 数据交换  746
    12.7.4 File Dialogs / 文件对话框  752
    12.7.5 Color Choosers / 颜色选择器  764
    12.8 Troubleshooting GUI Programs / GUI程序的问题定位  770
    12.8.1 Debugging Tips / 调试技巧  770
    12.8.2 Letting the AWT Robot Do the Work / 把工作交给AWT Robot  774
    Chapter 13: Deploying Java Applications / 部署Java应用程序  779
    13.1 JAR Files / JAR文件  780
    13.1.1 Creating JARfiles / 创建JAR文件  780
    13.1.2 The Manifest / 清单文件  781
    13.1.3 Executable JAR Files / 可执行的JAR文件  782
    13.1.4 Resources / 资源  783
    13.1.5 Sealing / 封闭  787
    13.2 Storage of Application Preferences / 应用偏好信息的存储  788
    13.2.1 Property Maps / 属性映射  788
    13.2.2 The Preferences API / Properties API  794
    13.3 Service Loaders / 服务加载器  800
    13.4 Applets / Applet  802
    13.4.1 A Simple Applet / 一个简单的Applet  803
    13.4.2 The applet HTML Tag and Its Attributes / applet HTML标记及其属性  808
    13.4.3 Use of Parameters to Pass Information to Applets / 使用参数向Applet传递信息  810
    13.4.4 Accessing Image and Audio Files / 访问图片和音频文件  816
    13.4.5 The Applet Context / Applet上下文  818
    13.4.6 Inter-Applet Communication / Applet间的通信  818
    13.4.7 Displaying Items in the Browser / 在浏览器中显示信息  819
    13.4.8 The Sandbox / 沙箱  820
    13.4.9 Signed Code / 签名代码  822
    13.5 Java Web Start / Java Web Start  824
    13.5.1 Delivering a Java Web Start Application / 交付一个Java Web Start应用  824
    13.5.2 The JNLP API / JNLP API  829
    Chapter 14: Concurrency /并发  839
    14.1 What Are Threads? / 什么是线程  840
    14.1.1 Using Threads to Give Other Tasks a Chance / 使用线程为其他任务提供执行机会  846
    14.2 Interrupting Threads / 中断线程  851
    14.3 Thread States / 线程状态  855
    14.3.1 New Threads / 新创建线程  855
    14.3.2 Runnable Threads / 可运行线程  855
    14.3.3 Blocked and Waiting Threads / 被阻塞线程与等待线程  856
    14.3.4 Terminated Threads / 被终止的线程  857
    14.4 Thread Properties / 线程属性  858
    14.4.1 Thread Priorities / 线程优先级  858
    14.4.2 Daemon Threads / 守护线程  859
    14.4.3 Handlers for Uncaught Exceptions / 未捕获异常的处理器  860
    14.5 Synchronization / 同步  862
    14.5.1 An Example of a Race Condition / 竞争条件的一个案例  862
    14.5.2 The Race Condition Explained / 竞争条件详解  866
    14.5.3 Lock Objects / 锁对象  868
    14.5.4 Condition Objects / 条件对象  872
    14.5.5 The synchronized Keyword / synchronized关键字  878
    14.5.6 Synchronized Blocks / 同步块  882
    14.5.7 The Monitor Concept / 监视器概念  884
    14.5.8 Volatile Fields / volatile字段  885
    14.5.9 Final Variables / final变量  886
    14.5.10 Atomics / 原子  886
    14.5.11 Deadlocks / 死锁  889
    14.5.12 Thread-Local Variables / 线程局部变量  892
    14.5.13 Lock Testing and Timeouts / 锁测试与超时  893
    14.5.14 Read / Write Locks / 读/写锁  895
    14.5.15 Why the stop and suspend Methods Are Deprecated / 为什么弃用stop和suspend方法  896
    14.6 Blocking Queues / 阻塞队列  898
    14.7 Thread-Safe Collections / 线程安全的集合  905
    14.7.1 Efficient Maps, Sets, and Queues / 高效的映射、集和队列  905
    14.7.2 Atomic Update of Map Entries / 映射表项的原子更新  907
    14.7.3 Bulk Operations on Concurrent Hash Maps / 并发散列映射上的主要操作  909
    14.7.4 Concurrent Set Views / 并发的集视图  912
    14.7.5 Copy on Write Arrays / 写时复制的数组  912
    14.7.6 Parallel Array Algorithms / 并行数组算法  912
    14.7.7 Older Thread-Safe Collections / 较早的线程安全的集合  914
    14.8 Callables and Futures / Callable与Future  915
    14.9 Executors / 执行器  920
    14.9.1 Thread Pools / 线程池  921
    14.9.2 Scheduled Execution / 预订执行  926
    14.9.3 Controlling Groups of Tasks / 控制任务组  927
    14.9.4 The Fork-Join Framework / Fork-Join框架  928
    14.9.5 Completable Futures / CompletableFuture  931
    14.10 Synchronizers / 同步器  934
    14.10.1 Semaphores / 信号量  935
    14.10.2 Countdown Latches / 倒计时门栓  936
    14.10.3 Barriers / 障栅  936
    14.10.4 Exchangers / 交换器  937
    14.10.5 Synchronous Queues / 同步队列  937
    14.11 Threads and Swing / 线程与Swing  937
    14.11.1 Running Time-Consuming Tasks / 运行耗时任务  939
    14.11.2 Using the Swing Worker / 使用Swing工作线程  943
    14.11.3 The Single-Thread Rule / 单线程规则  951
    Appendix / 附录  953
查看详情
相关图书 / 更多
您可能感兴趣 / 更多
Java核心技术 卷I 基础知识 第10版 英文版 上下册
无辜者的谎言(相信我!看到结局你一定会头皮发麻;全美读者推荐的悬疑神作,GOODREADS高分作品)
[美]A.R.托雷 著;梁颂宇 译;星文文化 出品
Java核心技术 卷I 基础知识 第10版 英文版 上下册
孩子,把你的手给我1:怎么说孩子才爱听,怎么教孩子才肯学?帮助每一位3-12岁孩子的父母结束与孩子的所有冲突!
[美]海姆·G.吉诺特
Java核心技术 卷I 基础知识 第10版 英文版 上下册
哲学、历史与僭政——重审施特劳斯与科耶夫之争
[美]弗罗斯特(Bryan-Paul Frost) 编;[美]伯恩斯(Timothy W. Burns)
Java核心技术 卷I 基础知识 第10版 英文版 上下册
怎样做成大事
[美]丹·加德纳(Dan Gardner) 著;贾拥民 译;湛庐文化 出品;[丹麦]傅以斌(Bent Flyvbjerg)
Java核心技术 卷I 基础知识 第10版 英文版 上下册
力量训练的科学基础与实践应用(第三版)
[美]弗拉基米尔· M.扎齐奥尔斯基;[美]威廉·J.克雷默;[美]安德鲁· C.弗赖伊
Java核心技术 卷I 基础知识 第10版 英文版 上下册
1200年希腊罗马神话
[美]伊迪丝·汉密尔顿
Java核心技术 卷I 基础知识 第10版 英文版 上下册
爱情心理学(新编本)
[美]罗伯特·J. 斯腾伯格 (美)凯琳·斯腾伯格 倪爱萍 译
Java核心技术 卷I 基础知识 第10版 英文版 上下册
黄金圈法则
[美]西蒙·斯涅克 著;磨铁文化 出品
Java核心技术 卷I 基础知识 第10版 英文版 上下册
最后一章
[美]厄尼·派尔
Java核心技术 卷I 基础知识 第10版 英文版 上下册
汤姆·索亚历险记 彩图注音版 一二三四年级5-6-7-8-9岁小学生课外阅读经典 儿童文学无障碍有声伴读世界名著童话故事
[美]马克 吐温
Java核心技术 卷I 基础知识 第10版 英文版 上下册
富兰克林自传 名家全译本 改变无数人命运的励志传奇 埃隆马斯克反复推荐 赠富兰克林签名照及精美插图
[美]本杰明·富兰克林 著;李自修 译
Java核心技术 卷I 基础知识 第10版 英文版 上下册
国际大奖图画书系列 共11册(小老鼠的恐惧的大书,大灰狼,红豆与菲比,别烦我,下雪了 ,穿靴子的猫 ,先有蛋,绿 ,特别快递,如果你想看鲸鱼 ,一个部落的孩子 ) 麦克米伦世纪
[美]莱恩·史密斯 (英)埃米莉·格雷维特 (美)劳拉·瓦卡罗·等/文 (英)埃米莉·格雷维特 等/图 彭懿 杨玲玲 阿甲 孙慧阳 白薇 译