Book description
The Definitive Java Programming Guide
Fully updated for Java SE 9, Java: The Complete Reference, Tenth Edition explains how to develop, compile, debug, and run Java programs. Bestselling programming author Herb Schildt covers the entire Java language, including its syntax, keywords, and fundamental programming principles. You'll also find information on key portions of the Java API library, such as I/O, the Collections Framework, the stream library, and the concurrency utilities. Swing, JavaFX, JavaBeans, and servlets are examined and numerous examples demonstrate Java in action. Of course, the new module system added by Java SE 9 is discussed in detail. This Oracle Press resource also offers an introduction to JShell, Java’s new interactive programming tool.
Coverage includes:
•Data types, variables, arrays, and operators
•Control statements
•Classes, objects, and methods
•Method overloading and overriding
•Inheritance
•Interfaces and packages
•Exception handling
•Multithreaded programming
•Enumerations, autoboxing, and annotations
•The I/O classes
•Generics
•Lambda expressions
•Modules
•String handling
•The Collections Framework
•Networking
•Event handling
•AWT
•Swing and JavaFX
•The Concurrent API
•The Stream API
•Regular expressions
•JavaBeans
•Servlets
•Much, much more
Code examples in the book are available for download at www.OraclePressBooks.com.
TAG: For a complete list of Oracle Press titles, visit www.OraclePressBooks.com.
Companion material for this title can be found here.
Table of contents
- Cover Page
- Title Page
- Copyright Page
- Contents at a Glance
- Contents
- Preface
-
Part I The Java Language
- Chapter 1 The History and Evolution of Java
- Chapter 2 An Overview of Java
- Chapter 3 Data Types, Variables, and Arrays
- Chapter 4 Operators
- Chapter 5 Control Statements
- Chapter 6 Introducing Classes
-
Chapter 7 A Closer Look at Methods and Classes
- Overloading Methods
- Using Objects as Parameters
- A Closer Look at Argument Passing
- Returning Objects
- Recursion
- Introducing Access Control
- Understanding static
- Introducing final
- Arrays Revisited
- Introducing Nested and Inner Classes
- Exploring the String Class
- Using Command-Line Arguments
- Varargs: Variable-Length Arguments
- Chapter 8 Inheritance
- Chapter 9 Packages and Interfaces
- Chapter 10 Exception Handling
-
Chapter 11 Multithreaded Programming
- The Java Thread Model
- The Main Thread
- Creating a Thread
- Creating Multiple Threads
- Using isAlive( ) and join( )
- Thread Priorities
- Synchronization
- Interthread Communication
- Suspending, Resuming, and Stopping Threads
- Obtaining a Thread’s State
- Using a Factory Method to Create and Start a Thread
- Using Multithreading
- Chapter 12 Enumerations, Autoboxing, and Annotations
-
Chapter 13 I/O, Try-with-Resources, and Other Topics
- I/O Basics
- Reading Console Input
- Writing Console Output
- The PrintWriter Class
- Reading and Writing Files
- Automatically Closing a File
- The transient and volatile Modifiers
- Using instanceof
- strictfp
- Native Methods
- Using assert
- Static Import
- Invoking Overloaded Constructors Through this( )
- A Word About Compact API Profiles
-
Chapter 14 Generics
- What Are Generics?
- A Simple Generics Example
- A Generic Class with Two Type Parameters
- The General Form of a Generic Class
- Bounded Types
- Using Wildcard Arguments
- Creating a Generic Method
- Generic Interfaces
- Raw Types and Legacy Code
- Generic Class Hierarchies
- Type Inference with Generics
- Erasure
- Ambiguity Errors
- Some Generic Restrictions
- Chapter 15 Lambda Expressions
-
Chapter 16 Modules
- Module Basics
- java.base and the Platform Modules
- Legacy Code and the Unnamed Module
- Exporting to a Specific Module
- Using requires transitive
- Use Services
- Module Graphs
- Three Specialized Module Features
- Introducing jlink and Module JAR Files
- A Brief Word About Layers and Automatic Modules
- Final Thoughts on Modules
-
Part II The Java Library
- Chapter 17 String Handling
-
Chapter 18 Exploring java.lang
- Primitive Type Wrappers
- Void
- Process
- Runtime
- Runtime.Version
- ProcessBuilder
- System
- System.Logger and System.LoggerFinder
- Object
- Using clone( ) and the Cloneable Interface
- Class
- ClassLoader
- Math
- StrictMath
- Compiler
- Thread, ThreadGroup, and Runnable
- ThreadLocal and InheritableThreadLocal
- Package
- Module
- ModuleLayer
- RuntimePermission
- Throwable
- SecurityManager
- StackTraceElement
- StackWalker and StackWalker.StackFrame
- Enum
- ClassValue
- The CharSequence Interface
- The Comparable Interface
- The Appendable Interface
- The Iterable Interface
- The Readable Interface
- The AutoCloseable Interface
- The Thread.UncaughtExceptionHandler Interface
- The java.lang Subpackages
-
Chapter 19 java.util Part 1: The Collections Framework
- Collections Overview
- The Collection Interfaces
- The Collection Classes
- Accessing a Collection via an Iterator
- Spliterators
- Storing User-Defined Classes in Collections
- The RandomAccess Interface
- Working with Maps
- Comparators
- The Collection Algorithms
- Arrays
- The Legacy Classes and Interfaces
- Parting Thoughts on Collections
-
Chapter 20 java.util Part 2: More Utility Classes
- StringTokenizer
- BitSet
- Optional, OptionalDouble, OptionalInt, and OptionalLong
- Date
- Calendar
- GregorianCalendar
- TimeZone
- SimpleTimeZone
- Locale
- Random
- Timer and TimerTask
- Currency
-
Formatter
- The Formatter Constructors
- The Formatter Methods
- Formatting Basics
- Formatting Strings and Characters
- Formatting Numbers
- Formatting Time and Date
- The %n and %% Specifiers
- Specifying a Minimum Field Width
- Specifying Precision
- Using the Format Flags
- Justifying Output
- The Space, +, 0, and ( Flags
- The Comma Flag
- The # Flag
- The Uppercase Option
- Using an Argument Index
- Closing a Formatter
- The Java printf( ) Connection
- Scanner
- The ResourceBundle, ListResourceBundle, and PropertyResourceBundle Classes
- Miscellaneous Utility Classes and Interfaces
- The java.util Subpackages
- Chapter 21 Input/Output: Exploring java.io
- Chapter 22 Exploring NIO
- Chapter 23 Networking
-
Chapter 24 Event Handling
- Two Event Handling Mechanisms
- The Delegation Event Model
- Event Classes
- The KeyEvent Class
- Sources of Events
-
Event Listener Interfaces
- The ActionListener Interface
- The AdjustmentListener Interface
- The ComponentListener Interface
- The ContainerListener Interface
- The FocusListener Interface
- The ItemListener Interface
- The KeyListener Interface
- The MouseListener Interface
- The MouseMotionListener Interface
- The MouseWheelListener Interface
- The TextListener Interface
- The WindowFocusListener Interface
- The WindowListener Interface
- Using the Delegation Event Model
- Adapter Classes
- Inner Classes
- Chapter 25 Introducing the AWT: Working with Windows, Graphics, and Text
- Chapter 26 Using AWT Controls, Layout Managers, and Menus
- Chapter 27 Images
-
Chapter 28 The Concurrency Utilities
- The Concurrent API Packages
- Using Synchronization Objects
- Using an Executor
- The TimeUnit Enumeration
- The Concurrent Collections
- Locks
- Atomic Operations
-
Parallel Programming via the Fork/Join Framework
- The Main Fork/Join Classes
- The Divide-and-Conquer Strategy
- A Simple First Fork/Join Example
- Understanding the Impact of the Level of Parallelism
- An Example that Uses RecursiveTask<V>
- Executing a Task Asynchronously
- Cancelling a Task
- Determining a Task’s Completion Status
- Restarting a Task
- Things to Explore
- Some Fork/Join Tips
- The Concurrency Utilities Versus Java’s Traditional Approach
- Chapter 29 The Stream API
- Chapter 30 Regular Expressions and Other Packages
-
Part III Introducing GUI Programming with Swing
- Chapter 31 Introducing Swing
- Chapter 32 Exploring Swing
-
Chapter 33 Introducing Swing Menus
- Menu Basics
- An Overview of JMenuBar, JMenu, and JMenuItem
- Create a Main Menu
- Add Mnemonics and Accelerators to Menu Items
- Add Images and Tooltips to Menu Items
- Use JRadioButtonMenuItem and JCheckBoxMenuItem
- Create a Popup Menu
- Create a Toolbar
- Use Actions
- Put the Entire MenuDemo Program Together
- Continuing Your Exploration of Swing
-
Part IV Introducing GUI Programming with JavaFX
- Chapter 34 Introducing JavaFX GUI Programming
- Chapter 35 Exploring JavaFX Controls
- Chapter 36 Introducing JavaFX Menus
-
Part V Applying Java
- Chapter 37 Java Beans
- Chapter 38 Introducing Servlets
-
Part VI Appendixes
- Appendix A Using Java’s Documentation Comments
- Appendix B An Overview of Java Web Start
- Appendix C Introducing JShell
- Appendix D Applet Basics
- Index
Product information
- Title: Java: The Complete Reference, 10th Edition
- Author(s):
- Release date: October 2017
- Publisher(s): McGraw-Hill
- ISBN: 9781259589348
You might also like
book
Java The Complete Reference, 8th Edition, 8th Edition
The Definitive Java Programming Guide In Java: The Complete Reference, Eighth Edition, bestselling programming author Herb …
book
Java: The Complete Reference, Ninth Edition, 9th Edition
The Definitive Java Programming Guide Fully updated for Java SE 8, Java: The Complete Reference, Ninth …
book
Java: The Complete Reference, Eleventh Edition, 11th Edition
The Definitive Java Programming Guide Fully updated for Java SE 11, Java: The Complete Reference, Eleventh …
book
Java for Absolute Beginners: Learn to Program the Fundamentals the Java 9+ Way
Write your first code in Java using simple, step-by-step examples that model real-word objects and events, …