Book description
Readers familiar with Horstmann’s original, two-volume “Core Java” books who are looking for a comprehensive, but condensed guide to all of the new features and functions of Java SE 9 will learn how these new features impact the language and core libraries. Instead of the meticulous detail that the much larger two-volume set provides, this condensed treatment focuses on practical examples and is presented in bite-sized chunks.
As with Java 8, Modern Java idioms are no longer required and there is a much faster, easier pathway for learning Java. Horstmann quickly cuts to the chase without lecturing about the superiority of one paradigm over another or rehashing Java history. Given the size of the Java language and the scope of the new features introduced in Java 9, there is a great deal of new material to cover, but it is presented in small chunks organized so that you can quickly retrieve it when needed.
This book covers all aspects of Java that a modern developer needs to know, including modularity, as well as the powerful lambda expressions that were introduced in Java 8. It will also tell you how to find out more about old-fashioned concepts that you might still see in legacy code, but won’t dwell on them.
Table of contents
- Title Page
- Copyright Page
- Dedication Page
- Contents
- Preface
- Acknowledgments
- About the Author
- Chapter 1. Fundamental Programming Structures
- Chapter 2. Object-Oriented Programming
- Chapter 3. Interfaces and Lambda Expressions
-
Chapter 4. Inheritance and Reflection
-
4.1 Extending a Class
- 4.1.1 Super- and Subclasses
- 4.1.2 Defining and Inheriting Subclass Methods
- 4.1.3 Method Overriding
- 4.1.4 Subclass Construction
- 4.1.5 Superclass Assignments
- 4.1.6 Casts
- 4.1.7 Final Methods and Classes
- 4.1.8 Abstract Methods and Classes
- 4.1.9 Protected Access
- 4.1.10 Anonymous Subclasses
- 4.1.11 Inheritance and Default Methods
- 4.1.12 Method Expressions with super
- 4.2 Object: The Cosmic Superclass
- 4.3 Enumerations
- 4.4 Runtime Type Information and Resources
- 4.5 Reflection
- Exercises
-
4.1 Extending a Class
-
Chapter 5. Exceptions, Assertions, and Logging
-
5.1 Exception Handling
- 5.1.1 Throwing Exceptions
- 5.1.2 The Exception Hierarchy
- 5.1.3 Declaring Checked Exceptions
- 5.1.4 Catching Exceptions
- 5.1.5 The Try-with-Resources Statement
- 5.1.6 The finally Clause
- 5.1.7 Rethrowing and Chaining Exceptions
- 5.1.8 Uncaught Exceptions and the Stack Trace
- 5.1.9 The Objects.requireNonNull Method
- 5.2 Assertions
- 5.3 Logging
- Exercises
-
5.1 Exception Handling
-
Chapter 6. Generic Programming
- 6.1 Generic Classes
- 6.2 Generic Methods
- 6.3 Type Bounds
- 6.4 Type Variance and Wildcards
- 6.5 Generics in the Java Virtual Machine
-
6.6 Restrictions on Generics
- 6.6.1 No Primitive Type Arguments
- 6.6.2 At Runtime, All Types Are Raw
- 6.6.3 You Cannot Instantiate Type Variables
- 6.6.4 You Cannot Construct Arrays of Parameterized Types
- 6.6.5 Class Type Variables Are Not Valid in Static Contexts
- 6.6.6 Methods May Not Clash after Erasure
- 6.6.7 Exceptions and Generics
- 6.7 Reflection and Generics
- Exercises
- Chapter 7. Collections
-
Chapter 8. Streams
- 8.1 From Iterating to Stream Operations
- 8.2 Stream Creation
- 8.3 The filter, map, and flatMap Methods
- 8.4 Extracting Substreams and Combining Streams
- 8.5 Other Stream Transformations
- 8.6 Simple Reductions
- 8.7 The Optional Type
- 8.8 Collecting Results
- 8.9 Collecting into Maps
- 8.10 Grouping and Partitioning
- 8.11 Downstream Collectors
- 8.12 Reduction Operations
- 8.13 Primitive Type Streams
- 8.14 Parallel Streams
- Exercises
- Chapter 9. Processing Input and Output
- Chapter 10. Concurrent Programming
- Chapter 11. Annotations
- Chapter 12. The Date and Time API
- Chapter 13. Internationalization
-
Chapter 14. Compiling and Scripting
- 14.1 The Compiler API
- 14.2 The Scripting API
-
14.3 The Nashorn Scripting Engine
- 14.3.1 Running Nashorn from the Command Line
- 14.3.2 Invoking Getters, Setters, and Overloaded Methods
- 14.3.3 Constructing Java Objects
- 14.3.4 Strings in JavaScript and Java
- 14.3.5 Numbers
- 14.3.6 Working with Arrays
- 14.3.7 Lists and Maps
- 14.3.8 Lambdas
- 14.3.9 Extending Java Classes and Implementing Java Interfaces
- 14.3.10 Exceptions
- 14.4 Shell Scripting with Nashorn
- Exercises
-
Chapter 15. The Java Platform Module System
- 15.1 The Module Concept
- 15.2 Naming Modules
- 15.3 The Modular “Hello, World!” Program
- 15.4 Requiring Modules
- 15.5 Exporting Packages
- 15.6 Modules and Reflective Access
- 15.7 Modular JARs
- 15.8 Automatic Modules and the Unnamed Module
- 15.9 Command-Line Flags for Migration
- 15.10 Transitive and Static Requirements
- 15.11 Qualified Exporting and Opening
- 15.12 Service Loading
- 15.13 Tools for Working with Modules
- Exercises
- Index
Product information
- Title: Core Java SE 9 for the Impatient, 2nd Edition
- Author(s):
- Release date: September 2017
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780134694849
You might also like
book
Core Java for the Impatient, 3rd Edition
Clear, Concise Guide to the Core Language and Libraries--Updated through Java 17 Modern Java introduces major …
book
Learning Java, 4th Edition
Java is the preferred language for many of today’s leading-edge technologies—everything from smartphones and game consoles …
book
Learning Java, 6th Edition
Ideal for working programmers new to Java, this best-selling book guides you through the language features …
book
Java in a Nutshell, 7th Edition
This updated edition of Java in a Nutshell not only helps experienced Java programmers get the …