Learning Java, 5th Edition

Book Description

If you’re new to Java—or new to programming—this bestselling book will guide you through the language features and APIs of Java 11 and beyond. With fun, compelling, and realistic examples, authors Marc Loy, Patrick Niemeyer, and Daniel Leuck introduce you to Java fundamentals—including its class libraries, programming techniques, and idioms—with an eye toward building real applications.

  • Learn basic syntax, classes and objects, and other components
  • Develop with Java, using the compiler, interpreter, and other tools
  • Explore Java’s built-in thread facilities and concurrency package
  • Write networked or web-based applications and services
  • Build graphical applications using Java component architecture
  • Explore rich new desktop APIs

Table of Contents

  1. 1. A Modern Language
    1. Enter Java
      1. Java’s Origins
      2. Growing Up
    2. A Virtual Machine
    3. Java Compared with Other Languages
    4. Safety of Design
      1. Simplify, Simplify, Simplify…
      2. Type Safety and Method Binding
      3. Incremental Development
      4. Dynamic Memory Management
      5. Error Handling
      6. Threads
      7. Scalability
    5. Safety of Implementation
      1. The Verifier
      2. Class Loaders
      3. Security Managers
    6. Application and User-Level Security
    7. A Java Road Map
      1. The Past: Java 1.0–Java 11
      2. The Present: Java 12
      3. The Future
      4. Availability
  2. 2. A First Application
    1. Java Tools and Environment
      1. Installing the JDK
      2. Installing OpenJDK on Linux
      3. Installing OpenJDK on Mac
      4. Installing OpenJDK on Windows
      5. Configuring IntelliJ IDEA and Creating a Project
      6. Running the Project
      7. Grabbing the Learning Java Examples
    2. HelloJava
      1. Classes
      2. The main() Method
      3. Classes and Objects
      4. Variables and Class Types
      5. HelloComponent
      6. Inheritance
      7. The JComponent Class
      8. Relationships and Finger Pointing
      9. Package and Imports
      10. The paintComponent() Method
    3. HelloJava2: The Sequel
      1. Instance Variables
      2. Constructors
      3. Events
      4. The repaint() Method
      5. Interfaces
    4. Goodbye and hello again
  3. 3. Tools of the Trade
    1. JDK Environment
    2. The Java VM
    3. Running Java Applications
      1. System Properties
    4. The Classpath
      1. javap
      2. Modules
    5. The Java Compiler
    6. Trying Java
    7. JAR Files
      1. File Compression
      2. The jar Utility
      3. The pack200 Utility
    8. Building up
  4. 4. The Java Language
    1. Text Encoding
    2. Comments
      1. Javadoc Comments
    3. Variables and Constants
    4. Types
      1. Primitive Types
      2. Reference Types
      3. Inferring Types
      4. Passing References
      5. A Word About Strings
    5. Statements and Expressions
      1. Statements
      2. Expressions
    6. Arrays
      1. Array Types
      2. Array Creation and Initialization
      3. Using Arrays
      4. Anonymous Arrays
      5. Multidimensional Arrays
    7. Types and Classes and Arrays, oh my!

Product Information

  • Title: Learning Java, 5th Edition
  • Author(s): Daniel Leuck, Patrick Niemeyer, Marc Loy
  • Release date: July 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492056263