Java SE8 程序設計(第3版 英文版)

Java SE8 程序設計(第3版 英文版) pdf epub mobi txt 電子書 下載 2025

[美] Paul Deitel(保羅·戴特爾),Harvey Deitel(哈維·戴特爾) 著
圖書標籤:
  • Java
  • Java SE8
  • Programming
  • Computer Science
  • Software Development
  • English Edition
  • 3rd Edition
  • Tutorial
  • Reference
  • IT
  • Books
想要找書就要到 靜思書屋
立刻按 ctrl+D收藏本頁
你會得到大驚喜!!
齣版社: 電子工業齣版社
ISBN:9787121273278
版次:3
商品編碼:11902956
品牌:Broadview
包裝:平裝
叢書名: 原味精品書係
開本:16開
齣版時間:2016-03-01
用紙:膠版紙
頁數:1084
正文語種:英文

具體描述

産品特色

內容簡介

  《Java SE8 程序設計(第3版)英文版》沿用瞭Deitel特色的“程序實況解說”,深入探討瞭Java編程語言和JavaAPI。通過完整的語法著色、代碼高亮、逐行代碼的演練和程序輸齣,全麵地介紹瞭測試程序的概念。《Java SE8 程序設計(第3版)英文版》中首先介紹瞭使用早期Java類和對象的方法,然後迅速轉移到更高級的主題,包括GUI、圖形、異常處理、Lambda錶達式、數據流、功能接口、對象序列化、並發性、泛型、泛型集閤、JDBC等。《Java SE8 程序設計(第3版)英文版》包含數百個完整的Java可運行示例、數韆行成熟的Java代碼,總結齣許多程序開發技巧,幫助你建立強大的應用程序。
  《Java SE8 程序設計(第3版)英文版》適閤具有一定高級語言編程背景的程序員閱讀。

作者簡介

  Paul Deitel,Deitel & Associates有限公司的CEO兼CTO,畢業於麻省理工學院,主修信息技術。他獲得瞭Java認證程序員和Java認證開發員稱號,並且是一名Oracle Java冠軍程序員。在Deitel & Associate有限公司工作的過程中,他已經為世界各地的客戶提供瞭數百節編程課程,這些客戶包括思科、IBM、西門子、Sun Microsystems、戴爾、Fidelity、肯尼迪航天中心、美國國傢強風暴實驗室、白沙導彈試驗場、Rogue Wave Software、波音公司、SunGard Higher Education、北電網絡公司、彪馬、iRobot、Invensys等。他和本書的閤著者Harvey M. Deitel博士是全球暢銷編程語言教材、專業書籍和視頻的作者。

  Harvey Deitel博士,Deitel & Associates有限公司的董事長和首席戰略官,在計算機領域擁有50多年的經驗。Deitel博士獲得瞭麻省理工學院電子工程專業的學士和碩士學位,並獲得瞭波士頓大學的數學博士學位。他擁有豐富的大學教學經驗,在1991年與兒子Paul Deitel創辦Deitel & Associates有限公司之前,他是波士頓大學計算機科學係的主任並獲得瞭終身任職權。Deitel的齣版物獲得瞭國際上的認可,並被翻譯為日語、德語、俄語、西班牙語、法語、波蘭語、意大利語、簡體中文、繁體中文、韓語、葡萄牙語、希臘語、烏爾都語和土耳其語齣版。Deitel博士為很多大公司、學術研究機構、政府機關和軍方提供瞭數百場專業編程講座。

目錄

推薦序
前言
閱讀本書之前的準備
1 Introduction to Java and Test-Driving a Java Application
1.1 Introduction
1.2 Object Technology Concepts
1.2.1 The Automobile as an Object
1.2.2 Methods and Classes
1.2.3 Instantiation
1.2.4 Reuse
1.2.5 Messages and Method Calls
1.2.6 Attributes and Instance Variables
1.2.7 Encapsulation and Information Hiding
1.2.8 Inheritance
1.2.9 Interfaces
1.2.10 Object-Oriented Analysis and Design (OOAD)
1.2.11 The UML (Unified Modeling Language)
1.3 Open Source Software
1.4 Java
1.5 A Typical Java Development Environment
1.6 Test-Driving a Java Application
1.7 Software Technologies
1.8 Keeping Up-to-Date with Information Technologies
2 Introduction to Java Applications; Input/Output and Operators
2.1 Introduction
2.2 Your First Program in Java: Printing a Line of Text
2.3 Modifying Your First Java Program
2.4 Displaying Text with printf
2.5 Another Application: Adding Integers
2.6 Arithmetic
2.7 Decision Making: Equality and Relational Operators
2.8 Wrap-Up
3 Introduction to Classes, Objects, Methods and Strings
3.1 Introduction
3.2 Instance Variables, set Methods and get Methods
3.2.1 Account Class with an Instance Variable, a set Method and a get Method
3.2.2 AccountTest Class That Creates and Uses an Object of Class Account
3.2.3 Compiling and Executing an App with Multiple Classes
3.2.4 Account UML Class Diagram with an Instance Variable and set and get Methods
3.2.5 Additional Notes on Class AccountTest
3.2.6 Software Engineering with private Instance Variables and public set and get Methods
3.3 Primitive Types vs. Reference Types
3.4 Account Class: Initializing Objects with Constructors
3.4.1 Declaring an Account Constructor for Custom Object Initialization
3.4.2 Class AccountTest : Initializing Account Objects When They’re Created
3.5 Account Class with a Balance; Floating-Point Numbers
3.5.1 Account Class with a balance Instance Variable of Type double
3.5.2 AccountTest Class to Use Class Account
3.6 Wrap-Up
4 Control Statements: Part 1; Assignment, ++ and -- Operators
4.1 Introduction
4.2 Control Structures
4.3 if Single-Selection Statement
4.4 if … else Double-Selection Statement
4.5 Student Class: Nested if … else Statements
4.6 while Repetition Statement
4.7 Counter-Controlled Repetition
4.8 Sentinel-Controlled Repetition
4.9 Nested Control Statements
4.10 Compound Assignment Operators
4.11 Increment and Decrement Operators
4.12 Primitive Types
4.13 Wrap-Up
5 Control Statements: Part 2; Logical Operators
5.1 Introduction
5.2 Essentials of Counter-Controlled Repetition
5.3 for Repetition Statement
5.4 Examples Using the for Statement
5.5 do … while Repetition Statement
5.6 switch Multiple-Selection Statement
5.7 Class AutoPolicy Case Study: String s in switch Statements
5.8 break and continue Statements
5.9 Logical Operators
5.10 Wrap-Up
6 Methods: A Deeper Look
6.1 Introduction
6.2 Program Modules in Java
6.3 static Methods, static Fields and Class Math
6.4 Declaring Methods with Multiple Parameters
6.5 Notes on Declaring and Using Methods
6.6 Argument Promotion and Casting
6.7 Java API Packages
6.8 Case Study: Secure Random-Number Generation
6.9 Case Study: A Game of Chance; Introducing enum Types
6.10 Scope of Declarations
6.11 Method Overloading
6.12 Wrap-Up
7 Arrays and ArrayLists
7.1 Introduction
7.2 Arrays
7.3 Declaring and Creating Arrays
7.4 Examples Using Arrays
7.4.1 Creating and Initializing an Array
7.4.2 Using an Array Initializer
7.4.3 Calculating the Values to Store in an Array
7.4.4 Summing the Elements of an Array
7.4.5 Using Bar Charts to Display Array Data Graphically
7.4.6 Using the Elements of an Array as Counters
7.4.7 Using Arrays to Analyze Survey Results
7.5 Exception Handling: Processing the Incorrect Response
7.5.1 The try Statement
7.5.2 Executing the catch Block
7.5.3 toString Method of the Exception Parameter
7.6 Case Study: Card Shuffling and Dealing Simulation
7.7 Enhanced for Statement
7.8 Passing Arrays to Methods
7.9 Pass-By-Value vs. Pass-By-Reference
7.10 Case Study: Class GradeBook Using an Array to Store Grades
7.11 Multidimensional Arrays
7.12 Case Study: Class GradeBook Using a Two-Dimensional Array
7.13 Variable-Length Argument Lists
7.14 Using Command-Line Arguments
7.15 Class Arrays
7.16 Introduction to Collections and Class ArrayList
7.17 Wrap-Up
8 Classes and Objects: A Deeper Look
8.1 Introduction
8.2 Time Class Case Study
8.3 Controlling Access to Members
8.4 Referring to the Current Object’s Members with the this Reference
8.5 Time Class Case Study: Overloaded Constructors
8.6 Default and No-Argument Constructors
8.7 Notes on Set and Get Methods
8.8 Composition
8.9 enum Types
8.10 Garbage Collection
8.11 static Class Members
8.12 static Import
8.13 final Instance Variables
8.14 Time Class Case Study: Creating Packages
8.15 Package Access
8.16 Using BigDecimal for Precise Monetary Calculations
8.17 Wrap-Up
9 Object-Oriented Programming: Inheritance
9.1 Introduction
9.2 Superclasses and Subclasses
9.3 protected Members
9.4 Relationship Between Superclasses and Subclasses
9.4.1 Creating and Using a CommissionEmployee Class
9.4.2 Creating and Using a BasePlusCommissionEmployee Class
9.4.3 Creating a CommissionEmployee ? BasePlusCommissionEmployee Inheritance Hierarchy
9.4.4 CommissionEmployee ? BasePlusCommissionEmployee Inheritance Hierarchy Using protected Instance Variables
9.4.5 CommissionEmployee ? BasePlusCommissionEmployee Inheritance Hierarchy Using private Instance Variables
9.5 Constructors in Subclasses
9.6 Class Object
9.7 Wrap-Up
10 Object-Oriented Programming: Polymorphism and Interfaces
10.1 Introduction
10.2 Polymorphism Examples
10.3 Demonstrating Polymorphic Behavior
10.4 Abstract Classes and Methods
10.5 Case Study: Payroll System Using Polymorphism
10.5.1 Abstract Superclass Employee
10.5.2 Concrete Subclass SalariedEmployee
10.5.3 Concrete Subclass HourlyEmployee
10.5.4 Concrete Subclass CommissionEmployee
10.5.5 Indirect Concrete Subclass BasePlusCommissionEmployee
10.5.6 Polymorphic Processing, Operator instanceof and Downcasting
10.6 Allowed Assignments Between Superclass and Subclass Variables
10.7 final Methods and Classes
10.8 A Deeper Explanation of Issues with Calling Methods from Constructors
10.9 Creating and Using Interfaces
10.9.1 Developing a Payable Hierarchy
10.9.2 Interface Payable
10.9.3 Class Invoice
10.9.4 Modifying Class Employee to Implement Interface Payable
10.9.5 Modifying Class SalariedEmployee for Use in the Payable Hierarchy
10.9.6 Using Interface Payable to Process Invoice s and Employees Polymorphically
10.9.7 Some Common Interfaces of the Java API
10.10 Java SE 8 Interface Enhancements
10.10.1 default Interface Methods
10.10.2 static Interface Methods
10.10.3 Functional Interfaces
10.11 Wrap-Up
11 Exception Handling: A Deeper Look
11.1 Introduction
11.2 Example: Divide by Zero without Exception Handling
11.3 Exception Handling: ArithmeticExceptions and InputMismatchExceptions
11.4 When to Use Exception Handling
11.5 Java Exception Hierarchy
11.6 finally Block
11.7 Stack Unwinding and Obtaining Information from an Exception Object 322
11.8 Chained Exceptions
11.9 Declaring New Exception Types
11.10 Preconditions and Postconditions
11.11 Assertions
11.12 try -with-Resources: Automatic Resource Deallocation
11.13 Wrap-Up
12 Swing GUI Components: Part
12.1 Introduction
12.2 Java’s Nimbus Look-and-Feel
12.3 Simple GUI-Based Input/Output with JOptionPane
12.4 Overview of Swing Components
12.5 Displaying Text and Images in a Window
12.6 Text Fields and an Introduction to Event Handling with Nested Classes
12.7 Common GUI Event Types and Listener Interfaces
12.8 How Event Handling Works
12.9 JButton
12.10 Buttons That Maintain State
12.10.1 JCheckBox
12.10.2 JRadioButton
12.11 JComboBox ; Using an Anonymous Inner Class for Event Handling
12.12 JList
12.13 Multiple-Selection Lists
12.14 Mouse Event Handling
12.15 Adapter Classes
12.16 JPanel Subclass for Drawing with the Mouse
12.17 Key Event Handling
12.18 Introduction to Layout Managers
12.18.1 FlowLayout
12.18.2 BorderLayout
12.18.3 GridLayout
12.19 Using Panels to Manage More Complex Layouts
12.20 JTextArea
12.21 Wrap-Up
13 Graphics and Java 2D
13.1 Introduction
13.2 Graphics Contexts and Graphics Objects
13.3 Color Control
13.4 Manipulating Fonts
13.5 Drawing Lines, Rectangles and Ovals
13.6 Drawing Arcs
13.7 Drawing Polygons and Polylines
13.8 Java 2D API
13.9 Wrap-Up
14 Strings, Characters and Regular Expressions
14.1 Introduction
14.2 Fundamentals of Characters and Strings
14.3 Class String
14.3.1 String Constructors
14.3.2 String Methods length , charAt and getChars
14.3.3 Comparing Strings
14.3.4 Locating Characters and Substrings in Strings
14.3.5 Extracting Substrings from Strings
14.3.6 Concatenating Strings
14.3.7 Miscellaneous String Methods
14.3.8 String Method valueOf
14.4 Class StringBuilder
14.4.1 StringBuilder Constructors
14.4.2 StringBuilder Methods length , capacity , setLength and ensureCapacity
14.4.3 StringBuilder Methods charAt , setCharAt , getChars and reverse
14.4.4 StringBuilder append Methods
14.4.5 StringBuilder Insertion and Deletion Methods
14.5 Class Character
14.6 Tokenizing String s
14.7 Regular Expressions, Class Pattern and Class Matcher
14.8 Wrap-Up
15 Files, Streams and Object Serialization
15.1 Introduction
15.2 Files and Streams
15.3 Using NIO Classes and Interfaces to Get File and Directory Information
15.4 Sequential-Access Text Files
15.4.1 Creating a Sequential-Access Text File
15.4.2 Reading Data from a Sequential-Access Text File
15.4.3 Case Study: A Credit-Inquiry Program
15.4.4 Updating Sequential-Access Files
15.5 Object Serialization
15.5.1 Creating a Sequential-Access File Using Object Serialization
15.5.2 Reading and Deserializing Data from a Sequential-Access File
15.6 Opening Files with JFileChooser
15.7 (Optional) Additional java.io Classes
15.7.1 Interfaces and Classes for Byte-Based Input and Output
15.7.2 Interfaces and Classes for Character-Based Input and Output
15.8 Wrap-Up
16 Generic Collections
16.1 Introduction
16.2 Collections Overview
16.3 Type-Wrapper Classes
16.4 Autoboxing and Auto-Unboxing
16.5 Interface Collection and Class Collections
16.6 Lists
16.6.1 ArrayList and Iterator
16.6.2 LinkedList
16.7 Collections Methods
16.7.1 Method sort
16.7.2 Method shuffle
16.7.3 Methods reverse , fill , copy , max and min
16.7.4 Method binarySearch
16.7.5 Methods addAll , frequency and disjoint
16.8 Stack Class of Package java.util
16.9 Class PriorityQueue and Interface Queue
16.10 Sets
16.11 Maps
16.12 Properties Class
16.13 Synchronized Collections
16.14 Unmodifiable Collections
16.15 Abstract Implementations
16.16 Wrap-Up
17 Java SE 8 Lambdas and Streams
17.1 Introduction
17.2 Functional Programming Technologies Overview
17.2.1 Functional Interfaces
17.2.2 Lambda Expressions
17.2.3 Streams
17.3 IntStream Operations
17.3.1 Creating an IntStream and Displaying Its Values with the forEach Terminal Operation
17.3.2 Terminal Operations count , min , max , sum and average
17.3.3 Terminal Operation reduce
17.3.4 Intermediate Operations: Filtering and Sorting IntStream Values
17.3.5 Intermediate Operation: Mapping
17.3.6 Creating Streams of int s with IntStream Methods range and rangeClosed
17.4 Stream<Integer> Manipulations
17.4.1 Creating a Stream<Integer>
17.4.2 Sorting a Stream and Collecting the Results
17.4.3 Filtering a Stream and Storing the Results for Later Use
17.4.4 Filtering and Sorting a Stream and Collecting the Results
17.4.5 Sorting Previously Collected Results
17.5 Stream<String> Manipulations
17.5.1 Mapping String s to Uppercase Using a Method Reference
17.5.2 Filtering String s Then Sorting Them in Case-Insensitive Ascending Order
17.5.3 Filtering String s Then Sorting Them in Case-Insensitive Descending Order
17.6 Stream<Employee> Manipulations
17.6.1 Creating and Displaying a List<Employee>
17.6.2 Filtering Employee s with Salaries in a Specified Range
17.6.3 Sorting Employee s By Multiple Fields
17.6.4 Mapping Employee s to Unique Last Name String s
17.6.5 Grouping Employee s By Department
17.6.6 Counting the Number of Employee s in Each Department
17.6.7 Summing and Averaging Employee Salaries
17.7 Creating a Stream<String> from a File
17.8 Generating Streams of Random Values
17.9 Lambda Event Handlers
17.10 Additional Notes on Java SE 8 Interfaces
17.11 Java SE 8 and Functional Programming Resources
17.12 Wrap-Up
18 Generic Classes and Methods
18.1 Introduction
18.2 Motivation for Generic Methods
18.3 Generic Methods: Implementation and Compile-Time Translation
18.4 Additional Compile-Time Translation Issues: Methods That Use a Type Parameter as the Return Type
18.5 Overloading Generic Methods
18.6 Generic Classes
18.7 Raw Types
18.8 Wildcards in Methods That Accept Type Parameters
18.9 Wrap-Up
19 Swing GUI Components: Part
19.1 Introduction
19.2 JSlider
19.3 Understanding Windows in Java
19.4 Using Menus with Frames
19.5 JPopupMenu
19.6 Pluggable Look-and-Feel
19.7 JDesktopPane and JInternalFrame
19.8 JTabbedPane
19.9 BoxLayout Layout Manager
19.10 GridBagLayout Layout Manager
19.11 Wrap-Up
20 Concurrency
20.1 Introduction
20.2 Thread States and Life Cycle
20.2.1 New and Runnable States
20.2.2 Waiting State
20.2.3 Timed Waiting State
20.2.4 Blocked State
20.2.5 Terminated State
20.2.6 Operating-System View of the Runnable State
20.2.7 Thread Priorities and Thread Scheduling
20.2.8 Indefinite Postponement and Deadlock
20.3 Creating and Executing Threads with the Executor Framework
20.4 Thread Synchronization
20.4.1 Immutable Data
20.4.2 Monitors
20.4.3 Unsynchronized Mutable Data Sharing
20.4.4 Synchronized Mutable Data Sharing―Making Operations Atomic
20.5 Producer/Consumer Relationship without Synchronization
20.6 Producer/Consumer Relationship: ArrayBlockingQueue
20.7 (Advanced) Producer/Consumer Relationship with synchronized , wait , notify and notifyAll
20.8 (Advanced) Producer/Consumer Relationship: Bounded Buffers
20.9 (Advanced) Producer/Consumer Relationship: The Lock and Condition Interfaces
20.10 Concurrent Collections
20.11 Multithreading with GUI: SwingWorker
20.11.1 Performing Computations in a Worker Thread: Fibonacci Numbers
20.11.2 Processing Intermediate Results: Sieve of Eratosthenes
20.12 sort / parallelSort Timings with the Java SE 8 Date/Time API
20.13 Java SE 8: Sequential vs. Parallel Streams
20.14 (Advanced) Interfaces Callable and Future
20.15 (Advanced) Fork/Join Framework
20.16 Wrap-Up
21 Accessing Databases with JDBC
21.1 Introduction
21.2 Relational Databases
21.3 A books Database
21.4 SQL
21.4.1 Basic SELECT Query
21.4.2 WHERE Clause
21.4.3 ORDER BY Clause
21.4.4 Merging Data from Multiple Tables: INNER JOIN
21.4.5 INSERT Statement
21.4.6 UPDATE Statement
21.4.7 DELETE Statement
21.5 Setting up a Java DB Database
21.5.1 Creating the Chapter’s Databases on Windows
21.5.2 Creating the Chapter’s Databases on Mac OS X
21.5.3 Creating the Chapter’s Databases on Linux
21.6 Manipulating Databases with JDBC
21.6.1 Connecting to and Querying a Database
21.6.2 Querying the books Database
21.7 RowSet Interface
21.8 PreparedStatement s
21.9 Stored Procedures
21.10 Transaction Processing
21.11 Wrap-Up
22 JavaFX GUI
22.1 Introduction
22.2 JavaFX Scene Builder and the NetBeans IDE
22.3 JavaFX App Window Structure
22.4 Welcome App―Displaying Text and an Image
22.4.1 Creating the App’s Project
22.4.2 NetBeans Projects Window―Viewing the Project Contents
22.4.3 Adding an Image to the Project
22.4.4 Opening JavaFX Scene Builder from NetBeans
22.4.5 Changing to a VBox Layout Container
22.4.6 Configuring the VBox Layout Container
22.4.7 Adding and Configuring a Label
22.4.8 Adding and Configuring an ImageView
22.4.9 Running the Welcome App
22.5 Tip Calculator App―Introduction to Event Handling
22.5.1 Test-Driving the Tip Calculator App
22.5.2 Technologies Overview
22.5.3 Building the App’s GUI
22.5.4 TipCalculator Class
22.5.5 TipCalculatorController Class
22.6 Wrap-Up
23 ATM Case Study, Part 1: Object-Oriented Design with the UML
23.1 Case Study Introduction
23.2 Examining the Requirements Document
23.3 Identifying the Classes in a Requirements Document
23.4 Identifying Class Attributes
23.5 Identifying Objects’ States and Activities
23.6 Identifying Class Operations
23.7 Indicating Collaboration Among Objects
23.8 Wrap-Up
24 ATM Case Study Part 2: Implementing an Object-Oriented Design
24.1 Introduction
24.2 Starting to Program the Classes of the ATM System
24.3 Incorporating Inheritance and Polymorphism into the ATM System
24.4 ATM Case Study Implementation
24.4.1 Class ATM
24.4.2 Class Screen
24.4.3 Class Keypad
24.4.4 Class CashDispenser
24.4.5 Class DepositSlot
24.4.6 Class Account
24.4.7 Class BankDatabase
24.4.8 Class Transaction
24.4.9 Class BalanceInquiry
24.4.10 Class Withdrawal
24.4.11 Class Deposit
24.4.12 Class ATMCaseStudy
24.5 Wrap-Up
A Operator Precedence Chart
B ASCII Character Set
C Keywords and Reserved Words
D Primitive Types
E Using the Debugger
E.1 Introduction
E.2 Breakpoints and the run , stop , cont and print Commands
E.3 The print and set Commands
E.4 Controlling Execution Using the step , step up and next Commands
E.5 The watch Command
E.6 The clear Command
E.7 Wrap-Up
F Using the Java API Documentation
F.1 Introduction
F.2 Navigating the Java API
G Creating Documentation with javadoc
G.1 Introduction
G.2 Documentation Comments
G.3 Documenting Java Source Code
G.4 javadoc
G.5 Files Produced by javadoc
H Unicode?
H.1 Introduction
H.2 Unicode Transformation Formats
H.3 Characters and Glyphs
H.4 Advantages/Disadvantages of Unicode
H.5 Using Unicode
H.6 Character Ranges
I Formatted Output
I.1 Introduction
I.2 Streams
I.3 Formatting Output with printf
I.4 Printing Integers
I.5 Printing Floating-Point Numbers
I.6 Printing Strings and Characters
I.7 Printing Dates and Times
I.8 Other Conversion Characters
I.9 Printing with Field Widths and Precisions
I.10 Using Flags in the printf Format String
I.11 Printing with Argument Indices
I.12 Printing Literals and Escape Sequences
I.13 Formatting Output with Class Formatter
I.14 Wrap-Up
J Number Systems
J.1 Introduction
J.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
J.3 Converting Octal and Hexadecimal Numbers to Binary Numbers
J.4 Converting from Binary, Octal or Hexadecimal to Decimal
J.5 Converting from Decimal to Binary, Octal or Hexadecimal
J.6 Negative Binary Numbers: Two’s Complement Notation
K Bit Manipulation
K.1 Introduction
K.2 Bit Manipulation and the Bitwise Operators
K.3 BitSet Class
L Labeled break and continue Statements
L.1 Introduction
L.2 Labeled break Statement
L.3 Labeled continue Statement
M UML 2: Additional Diagram Types
M.1 Introduction
M.2 Additional Diagram Types
N Design Patterns
N.1 Introduction
N.2 Creational, Structural and Behavioral Design Patterns
N.2.1 Creational Design Patterns
N.2.2 Structural Design Patterns
N.2.3 Behavioral Design Patterns
N.2.4 Conclusion
N.3 Design Patterns in Packages java.awt and javax.swing
N.3.1 Creational Design Patterns
N.3.2 Structural Design Patterns
N.3.3 Behavioral Design Patterns
N.3.4 Conclusion
N.4 Concurrency Design Patterns
N.5 Design Patterns Used in Packages java.io and java.net
N.5.1 Creational Design Patterns
N.5.2 Structural Design Patterns
N.5.3 Architectural Patterns
N.5.4 Conclusion
N.6 Design Patterns Used in Package java.util
N.6.1 Creational Design Patterns
N.6.2 Behavioral Design Patterns
N.7 Wrap-Up
Index

前言/序言


經典再版,深入剖析Java SE 8核心概念與實踐 《Java SE 8程序設計(第3版)》 是一部精心打磨的著作,專為希望精通Java SE 8核心概念並將其轉化為實際應用開發技能的程序員量身打造。本書以其清晰的邏輯、詳實的講解以及豐富的實踐案例,贏得瞭廣泛贊譽。第三版在內容上進行瞭全麵更新和深化,不僅覆蓋瞭Java SE 8最重要的新特性,更對Java語言的底層機製和設計哲學進行瞭深入的探索,旨在幫助讀者建立堅實、全麵的Java編程基礎。 本書的結構設計十分精巧,從基礎概念入手,循序漸進地引導讀者理解Java語言的方方麵麵。開篇即深入探討瞭Java程序設計的基石——麵嚮對象編程(OOP)的精髓。本書詳細闡述瞭封裝、繼承和多態這三大核心概念,並通過大量清晰易懂的示例,展示瞭如何在實際開發中有效地運用它們來構建模塊化、可維護和可擴展的代碼。讀者將學習如何設計類,理解對象之間的關係,並掌握利用接口和抽象類實現靈活設計的技巧。對於初學者而言,本書能夠幫助他們快速建立起對麵嚮對象思想的正確認知;對於有一定經驗的開發者,本書則能幫助他們迴顧和鞏固這些 foundational principles,並對其有更深刻的理解。 隨著麵嚮對象概念的深入,本書將目光投嚮瞭Java語言更強大的特性。其中,Lambda錶達式和Stream API是Java SE 8最引人注目的革新,本書為此投入瞭大量篇幅進行詳細介紹。讀者將學習Lambda錶達式簡潔而強大的語法,理解函數式接口的作用,並掌握如何使用Lambda錶達式來簡化匿名內部類的使用,從而編寫齣更具錶現力的代碼。緊接著,本書將引導讀者踏入Stream API的世界,深入理解流的概念,學習如何對數據集閤進行聲明式、並行化的處理。從過濾、映射到規約,本書全麵覆蓋瞭Stream API的常用操作,並提供瞭大量實用示例,展示如何利用Stream API高效地處理數據,提升程序性能。通過對這些新特性的深入學習,讀者將能夠編寫齣更簡潔、更高效,並且更易於維護的Java代碼,緊跟現代Java開發的步伐。 除瞭Lambda錶達式和Stream API,本書還係統地介紹瞭Java SE 8的其他重要特性。Optional類的引入,為處理可能為空的對象提供瞭一種更加健壯和聲明式的方式,本書將詳細講解Optional的各種操作,以及它如何幫助開發者避免NullPointerException,從而提高代碼的穩定性和可讀性。日期與時間API(JSR 310)的重大改進,也得到瞭本書的詳盡闡述。讀者將學習如何使用新的`java.time`包來處理日期、時間、時區以及持續時間,告彆舊API的諸多不便,掌握現代化的日期時間處理方式。 本書對Java內存模型和垃圾迴收機製的講解同樣細緻入微。理解內存是如何被管理,以及垃圾迴收器是如何工作的,對於寫齣高效、低內存占用的Java程序至關重要。本書將深入剖析JVM的內存區域劃分,例如堆、棧、方法區等,並詳細介紹垃圾迴收的各種算法和垃圾迴收器的實現原理。通過這些講解,讀者能夠更清晰地認識到代碼中的哪些模式可能導緻內存泄漏,以及如何編寫更優化的代碼以減少垃圾迴收的負擔,從而提升程序的性能和穩定性。 在並發編程方麵,本書也進行瞭深入的探討。Java提供瞭強大的並發工具,本書將引導讀者理解綫程的創建與管理,學習如何使用`synchronized`關鍵字、`Lock`接口等同步機製來保護共享資源,避免數據競爭和死鎖。同時,本書還將介紹Java並發包(`java.util.concurrent`)中的高級並發類,如`ExecutorService`、`Future`、`ConcurrentHashMap`等,幫助讀者構建高效、可靠的並發應用程序。通過對並發編程的全麵理解,讀者將能夠充分利用多核處理器的優勢,開發齣高性能的並發係統。 除瞭語言本身的特性,本書還非常注重實踐的應用。每一個概念的講解都伴隨著精心設計的代碼示例,這些示例不僅能夠幫助讀者理解抽象的理論,更能展示如何在實際開發場景中應用這些知識。從簡單的控製颱應用程序到更復雜的桌麵應用,本書的示例覆蓋瞭多種應用類型,讓讀者能夠將所學知識融會貫通。此外,本書還包含瞭一些貫穿全書的綜閤性項目,通過這些項目,讀者可以逐步構建一個完整的應用程序,從而在實踐中鞏固所學的Java SE 8編程技巧。 本書的語言風格嚴謹而清晰,避免瞭不必要的術語堆砌,力求讓每一個概念都易於理解。作者在內容組織上煞費苦心,確保知識點的邏輯連貫性,讓讀者在學習過程中不會感到迷茫。對於遇到的復雜概念,本書會通過圖示、類比等多種方式進行解釋,直至讀者能夠完全掌握。 總而言之,《Java SE 8程序設計(第3版)》 是一部不可多得的Java SE 8學習指南。它不僅是學習Java SE 8新特性和語言核心的寶典,更是提升Java開發實戰能力的有力工具。無論您是初入Java編程的學子,還是希望精進技藝的資深開發者,本書都將是您通往Java SE 8精通之路的理想伴侶。它將幫助您構建堅實的Java基礎,掌握現代Java開發的先進理念和技術,從而在日益激烈的技術競爭中脫穎而齣。通過本書的學習,您將能夠自信地運用Java SE 8來設計和實現各種復雜的應用程序,為您的職業生涯開啓新的篇章。

用戶評價

評分

我一直認為,要真正掌握一門編程語言,就必須理解其演進的過程和核心的設計理念。這本書,正是這樣一本能夠幫助我實現這一目標的好書。它不僅僅是Java SE 8特性的羅列,更像是對Java語言的一次深入剖析。作者通過對Lambda錶達式、Stream API等新特性的講解,讓我看到瞭Java如何擁抱函數式編程的趨勢,以及這些新特性如何與傳統的麵嚮對象編程思想相融閤。我特彆喜歡書中對Optional類的講解,它為解決Java中常見的空指針問題提供瞭一種優雅且更具錶達力的方式,讓我重新思考瞭代碼的可空性設計。此外,書中對並發編程的深入探討,讓我對Java的綫程模型、鎖機製有瞭更深刻的理解,並學會瞭如何利用CompletableFuture等工具來構建更高效、更健壯的並發應用。這本書讓我意識到,學習Java不僅僅是學習語法,更重要的是理解其設計哲學和最佳實踐,而這本書正是做到瞭這一點。

評分

我是一名剛剛接觸Java SE 8不久的學生,對於新特性感到有些迷茫。這本書就像是為我量身定做的指南針,指引我走齣迷霧。作者以一種非常友好的方式,循序漸進地介紹瞭Java SE 8的各個核心部分。從Lambda錶達式的入門,到Stream API的深入應用,再到Optional類的優雅處理空指針異常,我感覺自己每一步都走得很紮實。書中大量的代碼示例都經過瞭精心挑選,易於理解,並且能夠直接運行,這對我這個初學者來說幫助太大瞭。我不再隻是死記硬背語法,而是能夠真正理解這些新特性背後的邏輯和設計理念。特彆讓我印象深刻的是,書中對於接口默認方法和靜態方法的講解,讓我對接口的靈活性有瞭全新的認識。同時,對於Optional類的使用,也讓我養成瞭編寫更加健壯代碼的習慣,有效避免瞭惱人的NullPointerException。這本書不僅教會瞭我Java SE 8的知識,更重要的是,它培養瞭我用一種更現代、更麵嚮對象的方式來思考和編寫Java代碼的能力。

評分

作為一名資深的Java工程師,我一直秉持著對技術精益求精的態度。這本書的英文原版,確實在技術深度和廣度上都達到瞭相當的高度。作者在講解Java SE 8的核心特性時,並非流於錶麵,而是深入到瞭底層原理和設計哲學。例如,對於Lambda錶達式的解析,不僅僅是介紹語法,還詳細闡述瞭函數式接口、方法引用等概念,以及它們在JVM層麵是如何實現的。Stream API的部分更是精彩紛呈,作者不僅展示瞭如何使用Stream進行數據處理,還深入探討瞭其背後的惰性求值、短路操作等機製,以及如何通過並行Stream來提升性能。讓我印象深刻的是,書中還花瞭相當篇幅講解瞭CompletableFuture,並提供瞭大量關於如何構建復雜異步流程的實際案例,這對於我處理高並發、分布式係統非常有幫助。此外,書中對於Java內存模型、垃圾迴收機製的闡述也同樣深入,讓我對Java的底層運行機製有瞭更清晰的認識。這本書是一本值得反復研讀的著作,每一次閱讀都能從中獲得新的啓發。

評分

這本書簡直是為那些真正想深入理解Java SE 8核心精髓的人量身打造的。我花瞭相當多的時間閱讀和實踐其中的代碼示例,感覺自己對Lambda錶達式、Stream API、Optional類以及CompletableFuture等新特性的掌握提升瞭一個全新的颱階。作者並沒有止步於簡單地羅列這些特性,而是深入探討瞭它們背後的設計理念、適用場景以及與其他Java概念的聯動。特彆是關於Stream API的講解,讓我明白瞭如何利用函數式編程的思想來編寫更加簡潔、高效、易於維護的代碼,告彆瞭那些冗長的循環和臨時變量。書中對並發編程部分的闡述也同樣精彩,不僅僅是介紹瞭Thread和Runnable,更側重於如何利用Java內存模型和並發工具類來編寫健壯的並發程序,有效避免瞭常見的死鎖和競態條件問題。我特彆欣賞作者在講解復雜概念時,會循序漸進,從基礎概念開始,逐步引入高級用法,並且通過大量精心設計的代碼片段來佐證理論,使得學習過程既充實又富有啓發性。這本書不僅是一本技術手冊,更像是一位經驗豐富的導師,引領我一步步踏入Java SE 8的深度世界。

評分

作為一個在Java領域摸爬滾打瞭好幾年的開發者,我一直對Java SE 8的函數式編程特性感到好奇,但總是覺得有些晦澀難懂。直到我翻開這本書,纔真正感受到它的價值。作者用一種非常直觀的方式,將原本復雜的函數式概念拆解開來,讓我能夠清晰地理解Lambda錶達式的語法糖背後所蘊含的函數式編程思想。書中對Stream API的講解堪稱一絕,我學會瞭如何利用鏈式操作來處理集閤數據,極大地提高瞭代碼的可讀性和效率。例如,之前需要好幾行代碼纔能完成的過濾、映射、歸約操作,現在隻需要一行Stream API代碼就能搞定。更重要的是,作者並沒有迴避實際開發中可能遇到的問題,而是詳細地闡述瞭如何正確地使用這些新特性,避免潛在的陷阱,例如Stream的惰性求值特性以及並行Stream的正確使用時機。這本書也讓我對Java的並發模型有瞭更深刻的認識,尤其是關於CompletableFuture的使用,讓我能夠更優雅地處理異步操作,構建響應式係統。對於任何希望在Java SE 8時代保持技術領先的開發者來說,這本書絕對是不可或缺的參考。

評分

包裝挺好的。正在學習中

評分

書直接是裸著裝在袋子裏的 連封紙都沒有 感覺不是正版

評分

讀瞭前兩章,收獲非常大,值得推薦。

評分

講解 C++11 的書籍,適閤從 C++98 到 C++11 過度的程序員。

評分

書不錯,是正版

評分

不錯不錯。。。。。。。很好的一本書。。。是英文版的,。。。不吃純純粹粹

評分

寫更高效的代碼必備

評分

非常好,送貨也很快,可惜沒塑封

評分

書很好,快遞很快,外形沒有任何破損

相關圖書

本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度google,bing,sogou

© 2025 book.tinynews.org All Rights Reserved. 静思书屋 版权所有