Categories
Bibliography Java Software Engineering

Java – A Beginner’s Guide, by Herbert Schildt

See also: Java – The Complete Reference, Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Java – A Beginner’s Guide, 8th Edition, by Herbert Schildt, 2018, B07J2ZZ29H (JvBgnGd)

Fair Use Source: B07J2ZZ29H (JvBgnGd)

About This Book:

A practical introduction to Java programming—fully revised for long-term support release Java SE 11

Thoroughly updated for Java Platform Standard Edition 11, this hands-on resource shows, step by step, how to get started programming in Java from the very first chapter. Written by Java guru Herbert Schildt, the book starts with the basics, such as how to create, compile, and run a Java program. From there, you will learn essential Java keywords, syntax, and commands.

Java: A Beginner’s Guide, Eighth Edition covers the basics and touches on advanced features, including multithreaded programming, generics, Lambda expressions, and Swing. Enumeration, modules, and interface methods are also clearly explained. This Oracle Press guide delivers the appropriate mix of theory and practical coding necessary to get you up and running developing Java applications in no time.

  • Clearly explains all of the new Java SE 11 features
  • Features self-tests, exercises, and downloadable code samples
  • Written by bestselling author and leading Java authority Herbert Schildt

About the Author:

Herbert Schildt is one of the world’s leading programming authors and has written extensively on Java, C, C++, and C#. His books have sold millions of copies worldwide. Herb’s acclaimed books include Java: The Complete Reference, Java: A Beginner’s Guide, C: The Complete Reference, C++: The Complete Reference and C#: The Complete Reference

Book Details:

  • ASIN : B07J2ZZ29H
  • Publisher : McGraw-Hill Education; 8th edition (November 9, 2018)
  • Publication date : November 9, 2018
  • Print length : 720 pages

Table of Contents:

Published by McGraw-Hill, 2018

  1. Cover (01:09 mins)
  2. Title Page (01:09 mins)
  3. Copyright Page (03:27 mins)
  4. Contents at a Glance (01:09 mins)
  5. Contents (09:12 mins)
  6. Introduction (12:39 mins)
  7. 1 Java Fundamentals (60:57 mins)
  8. 2 Introducing Data Types and Operators (46:00 mins)
  9. 3 Program Control Statements (56:21 mins)
  10. 4 Introducing Classes, Objects, and Methods (43:42 mins)
  11. 5 More Data Types and Operators (75:54 mins)
  12. 6 A Closer Look at Methods and Classes (67:51 mins)
  13. 7 Inheritance (64:24 mins)
  14. 8 Packages and Interfaces (56:21 mins)
  15. 9 Exception Handling (42:33 mins)
  16. 10 Using I/O (66:42 mins)
  17. 11 Multithreaded Programming (66:42 mins)
  18. 12 Enumerations, Autoboxing, Static Import, and Annotations (44:51 mins)
  19. 13 Generics (57:30 mins)
  20. 14 Lambda Expressions and Method References (50:36 mins)
  21. 15 Modules (50:36 mins)
  22. 16 Introducing Swing (58:39 mins)
  23. A Answers to Self Tests (70:09 mins)
  24. B Using Java’s Documentation Comments (10:21 mins)
  25. C Compile and Run Simple Single-File Programs in One Step (03:27 mins)
  26. D Introducing JShell (17:15 mins)
  27. E More Java Keywords (06:54 mins)
  28. Index (29:54 mins)

Detailed Table of Contents

1 Java Fundamentals

  1. The History and Philosophy of Java
    1. The Origins of Java
    2. Java’s Lineage: C and C++
    3. How Java Impacted the Internet
    4. Java’s Magic: The Bytecode
    5. Moving Beyond Applets
    6. A Faster Release Schedule
    7. The Java Buzzwords
  2. Object-Oriented Programming
    1. Encapsulation
    2. Polymorphism
    3. Inheritance
  3. The Java Development Kit
  4. A First Simple Program
    1. Entering the Program
    2. Compiling the Program
    3. The First Sample Program Line by Line
  5. Handling Syntax Errors
  6. A Second Simple Program
  7. Another Data Type
  8. Try This 1-1: Converting Gallons to Liters
  9. Two Control Statements
    1. The if Statement
    2. The for Loop
  10. Create Blocks of Code
  11. Semicolons and Positioning
  12. Indentation Practices
  13. Try This 1-2: Improving the Gallons-to-Liters Converter
  14. The Java Keywords
  15. Identifiers in Java
  16. The Java Class Libraries
  17. Chapter 1 Self Test

2 Introducing Data Types and Operators

  1. Why Data Types Are Important
  2. Java’s Primitive Types
    1. Integers
    2. Floating-Point Types
    3. Characters
  3. The Boolean Type
  4. Try This 2-1: How Far Away Is the Lightning?
  5. Literals
    1. Hexadecimal, Octal, and Binary Literals
    2. Character Escape Sequences
    3. String Literals
  6. A Closer Look at Variables
    1. Initializing a Variable
    2. Dynamic Initialization
  7. The Scope and Lifetime of Variables
  8. Operators
  9. Arithmetic Operators
    1. Increment and Decrement
  10. Relational and Logical Operators
  11. Short-Circuit Logical Operators
  12. The Assignment Operator
  13. Shorthand Assignments
  14. Type Conversion in Assignments
  15. Casting Incompatible Types
  16. Operator Precedence
  17. Try This 2-2: Display a Truth Table for the Logical Operators
  18. Expressions
    1. Type Conversion in Expressions
    2. Spacing and Parentheses
  19. Chapter 2 Self Test

3 Program Control Statements

  1. Input Characters from the Keyboard
  2. The if Statement
  3. Nested ifs
  4. The if-else-if Ladder
  5. The switch Statement
  6. Nested switch Statements
  7. Try This 3-1: Start Building a Java Help System
  8. The for Loop
  9. Some Variations on the for Loop
  10. Missing Pieces
    1. The Infinite Loop
  11. Loops with No Body
  12. Declaring Loop Control Variables Inside the for Loop
  13. The Enhanced for Loop
  14. The while Loop
  15. The do-while Loop
  16. Try This 3-2: Improve the Java Help System
  17. Use break to Exit a Loop
  18. Use break as a Form of goto
  19. Use continue
  20. Try This 3-3: Finish the Java Help System
  21. Nested Loops
  22. Chapter 3 Self Test

4 Introducing Classes, Objects, and Methods

  1. Class Fundamentals
    1. The General Form of a Class
    2. Defining a Class
  2. How Objects Are Created
  3. Reference Variables and Assignment
  4. Methods
    1. Adding a Method to the Vehicle Class
  5. Returning from a Method
  6. Returning a Value
  7. Using Parameters
    1. Adding a Parameterized Method to Vehicle
  8. Try This 4-1: Creating a Help Class
  9. Constructors
  10. Parameterized Constructors
  11. Adding a Constructor to the Vehicle Class
  12. The new Operator Revisited
  13. Garbage Collection
  14. The this Keyword
  15. Chapter 4 Self Test

5 More Data Types and Operators

  1. Arrays
    1. One-Dimensional Arrays
  2. Try This 5-1: Sorting an Array
  3. Multidimensional Arrays
    1. Two-Dimensional Arrays
    2. Irregular Arrays
    3. Arrays of Three or More Dimensions
    4. Initializing Multidimensional Arrays
  4. Alternative Array Declaration Syntax
  5. Assigning Array References
  6. Using the length Member
  7. Try This 5-2: A Queue Class
  8. The For-Each Style for Loop
    1. Iterating Over Multidimensional Arrays
    2. Applying the Enhanced for
  9. Strings
    1. Constructing Strings
    2. Operating on Strings
    3. Arrays of Strings
    4. Strings Are Immutable
    5. Using a String to Control a switch Statement
  10. Using Command-Line Arguments
  11. Using Type Inference with Local Variables
    1. Local Variable Type Inference with Reference Types
    2. Using Local Variable Type Inference in a for Loop
    3. Some var Restrictions
  12. The Bitwise Operators
    1. The Bitwise AND, OR, XOR, and NOT Operators
    2. The Shift Operators
    3. Bitwise Shorthand Assignments
  13. Try This 5-3: A ShowBits Class
  14. The ? Operator
  15. Chapter 5 Self Test

6 A Closer Look at Methods and Classes

  1. Controlling Access to Class Members
    1. Java’s Access Modifiers
  2. Try This 6-1: Improving the Queue Class
  3. Pass Objects to Methods
    1. How Arguments Are Passed
  4. Returning Objects
  5. Method Overloading
  6. Overloading Constructors
  7. Try This 6-2: Overloading the Queue Constructor
  8. Recursion
  9. Understanding static
    1. Static Blocks
  10. Try This 6-3: The Quicksort
  11. Introducing Nested and Inner Classes
  12. Varargs: Variable-Length Arguments
    1. Varargs Basics
    2. Overloading Varargs Methods
    3. Varargs and Ambiguity
  13. Chapter 6 Self Test

7 Inheritance

  1. Inheritance Basics
  2. Member Access and Inheritance
  3. Constructors and Inheritance
  4. Using super to Call Superclass Constructors
  5. Using super to Access Superclass Members
  6. Try This 7-1: Extending the Vehicle Class
  7. Creating a Multilevel Hierarchy
  8. When Are Constructors Executed?
  9. Superclass References and Subclass Objects
  10. Method Overriding
  11. Overridden Methods Support Polymorphism
  12. Why Overridden Methods?
    1. Applying Method Overriding to TwoDShape
  13. Using Abstract Classes
  14. Using final
    1. final Prevents Overriding
    2. final Prevents Inheritance
    3. Using final with Data Members
  15. The Object Class
  16. Chapter 7 Self Test

8 Packages and Interfaces

  1. Packages
    1. Defining a Package
    2. Finding Packages and CLASSPATH
    3. A Short Package Example
  2. Packages and Member Access
    1. A Package Access Example
  3. Understanding Protected Members
  4. Importing Packages
  5. Java’s Class Library Is Contained in Packages
  6. Interfaces
  7. Implementing Interfaces
  8. Using Interface References
  9. Try This 8-1: Creating a Queue Interface
  10. Variables in Interfaces
  11. Interfaces Can Be Extended
  12. Default Interface Methods
    1. Default Method Fundamentals
    2. A More Practical Example of a Default Method
    3. Multiple Inheritance Issues
  13. Use static Methods in an Interface
  14. Private Interface Methods
  15. Final Thoughts on Packages and Interfaces
  16. Chapter 8 Self Test

9 Exception Handling

  1. The Exception Hierarchy
  2. Exception Handling Fundamentals
    1. Using try and catch
    2. A Simple Exception Example
  3. The Consequences of an Uncaught Exception
    1. Exceptions Enable You to Handle Errors Gracefully
  4. Using Multiple catch Statements
  5. Catching Subclass Exceptions
  6. Try Blocks Can Be Nested
  7. Throwing an Exception
    1. Rethrowing an Exception
  8. A Closer Look at Throwable
  9. Using finally
  10. Using throws
  11. Three Additional Exception Features
  12. Java’s Built-in Exceptions
  13. Creating Exception Subclasses
  14. Try This 9-1: Adding Exceptions to the Queue Class
  15. Chapter 9 Self Test

10 Using I/O

  1. Java’s I/O Is Built upon Streams
  2. Byte Streams and Character Streams
  3. The Byte Stream Classes
  4. The Character Stream Classes
  5. The Predefined Streams
  6. Using the Byte Streams
    1. Reading Console Input
    2. Writing Console Output
  7. Reading and Writing Files Using Byte Streams
    1. Inputting from a File
    2. Writing to a File
  8. Automatically Closing a File
  9. Reading and Writing Binary Data
  10. Try This 10-1: A File Comparison Utility
  11. Random-Access Files
  12. Using Java’s Character-Based Streams
    1. Console Input Using Character Streams
    2. Console Output Using Character Streams
  13. File I/O Using Character Streams
    1. Using a FileWriter
    2. Using a FileReader
  14. Using Java’s Type Wrappers to Convert Numeric Strings
  15. Try This 10-2: Creating a Disk-Based Help System
  16. Chapter 10 Self Test

11 Multithreaded Programming

  1. Multithreading Fundamentals
  2. The Thread Class and Runnable Interface
  3. Creating a Thread
    1. One Improvement and Two Simple Variations
  4. Try This 11-1: Extending Thread
  5. Creating Multiple Threads
  6. Determining When a Thread Ends
  7. Thread Priorities
  8. Synchronization
  9. Using Synchronized Methods
  10. The synchronized Statement
  11. Thread Communication Using notify( ), wait( ), and notifyAll( )
    1. An Example That Uses wait( ) and notify( )
  12. Suspending, Resuming, and Stopping Threads
  13. Try This 11-2: Using the Main Thread
  14. Chapter 11 Self Test

12 Enumerations, Autoboxing, Static Import, and Annotations

  1. Enumerations
    1. Enumeration Fundamentals
  2. Java Enumerations Are Class Types
  3. The values( ) and valueOf( ) Methods
  4. Constructors, Methods, Instance Variables, and Enumerations
    1. Two Important Restrictions
  5. Enumerations Inherit Enum
  6. Try This 12-1: A Computer-Controlled Traffic Light
  7. Autoboxing
  8. Type Wrappers
  9. Autoboxing Fundamentals
  10. Autoboxing and Methods
  11. Autoboxing/Unboxing Occurs in Expressions
    1. A Word of Warning
  12. Static Import
  13. Annotations (Metadata)
  14. Chapter 12 Self Test

13 Generics

  1. Generics Fundamentals
  2. A Simple Generics Example
    1. Generics Work Only with Reference Types
    2. Generic Types Differ Based on Their Type Arguments
    3. A Generic Class with Two Type Parameters
    4. The General Form of a Generic Class
  3. Bounded Types
  4. Using Wildcard Arguments
  5. Bounded Wildcards
  6. Generic Methods
  7. Generic Constructors
  8. Generic Interfaces
  9. Try This 13-1: Create a Generic Queue
  10. Raw Types and Legacy Code
  11. Type Inference with the Diamond Operator
  12. Local Variable Type Inference and Generics
  13. Erasure
  14. Ambiguity Errors
  15. Some Generic Restrictions
    1. Type Parameters Can’t Be Instantiated
    2. Restrictions on Static Members
    3. Generic Array Restrictions
    4. Generic Exception Restriction
  16. Continuing Your Study of Generics
  17. Chapter 13 Self Test

14 Lambda Expressions and Method References

  1. Introducing Lambda Expressions
    1. Lambda Expression Fundamentals
    2. Functional Interfaces
    3. Lambda Expressions in Action
  2. Block Lambda Expressions
  3. Generic Functional Interfaces
  4. Try This 14-1: Pass a Lambda Expression as an Argument
  5. Lambda Expressions and Variable Capture
  6. Throw an Exception from Within a Lambda Expression
  7. Method References
    1. Method References to static Methods
    2. Method References to Instance Methods
  8. Constructor References
  9. Predefined Functional Interfaces
  10. Chapter 14 Self Test

15 Modules

  1. Module Basics
    1. A Simple Module Example
    2. Compile and Run the First Module Example
    3. A Closer Look at requires and exports
  2. java.base and the Platform Modules
  3. Legacy Code and the Unnamed Module
  4. Exporting to a Specific Module
  5. Using requires transitive
  6. Try This 15-1: Experiment with requires transitive
  7. Use Services
    1. Service and Service Provider Basics
    2. The Service-Based Keywords
    3. A Module-Based Service Example
  8. Additional Module Features
    1. Open Modules
    2. The opens Statement
    3. requires static
  9. Continuing Your Study of Modules
  10. Chapter 15 Self Test

16 Introducing Swing

  1. The Origins and Design Philosophy of Swing
  2. Components and Containers
    1. Components
    2. Containers
    3. The Top-Level Container Panes
  3. Layout Managers
  4. A First Simple Swing Program
    1. The First Swing Example Line by Line
  5. Swing Event Handling
    1. Events
    2. Event Sources
    3. Event Listeners
    4. Event Classes and Listener Interfaces
  6. Use JButton
  7. Work with JTextField
  8. Create a JCheckBox
  9. Work with JList
  10. Try This 16-1: A Swing-Based File Comparison Utility
  11. Use Anonymous Inner Classes or Lambda Expressions to Handle Events
  12. Chapter 16 Self Test

A Answers to Self Tests

  1. Chapter 1: Java Fundamentals
  2. Chapter 2: Introducing Data Types and Operators
  3. Chapter 3: Program Control Statements
  4. Chapter 4: Introducing Classes, Objects, and Methods
  5. Chapter 5: More Data Types and Operators
  6. Chapter 6: A Closer Look at Methods and Classes
  7. Chapter 7: Inheritance
  8. Chapter 8: Packages and Interfaces
  9. Chapter 9: Exception Handling
  10. Chapter 10: Using I/O
  11. Chapter 11: Multithreaded Programming
  12. Chapter 12: Enumerations, Autoboxing, Static Import, and Annotations
  13. Chapter 13: Generics
  14. Chapter 14: Lambda Expressions and Method References
  15. Chapter 15: Modules
  16. Chapter 16: Introducing Swing

B Using Java’s Documentation Comments

  1. The javadoc Tags
    1. @author
    2. {@code}
    3. @deprecated
    4. {@docRoot}
    5. @exception
    6. @hidden
    7. {@index}
    8. {@inheritDoc}
    9. {@link}
    10. {@linkplain}
    11. {@literal}
    12. @param
    13. @provides
    14. @return
    15. @see
    16. @since
    17. {@summary}
    18. @throws
    19. @uses
    20. {@value}
    21. @version
  2. The General Form of a Documentation Comment
  3. What javadoc Outputs
  4. An Example That Uses Documentation Comments

C Compile and Run Simple Single-File Programs in One StepD Introducing JShell

  1. JShell Basics
  2. List, Edit, and Rerun Code
  3. Add a Method
  4. Create a Class
  5. Use an Interface
  6. Evaluate Expressions and Use Built-in Variables
  7. Importing Packages
  8. Exceptions
  9. Some More JShell Commands
  10. Exploring JShell Further

E More Java Keywords

  1. The transient and volatile Modifiers
  2. instanceof
  3. strictfp
  4. assert
  5. Native Methods
  6. Another Form of this

Index

Sources:

Fair Use Sources:

Categories
Bibliography Java Software Engineering

Java Quick Syntax Reference, by Mikael Olsson

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Java Quick Syntax Reference, 2nd Edition, by Mikael Olsson, 2018, B079BKJ6CB (JvQSynRf)

Fair Use Source: B079BKJ6CB (JvQSynRf)

About This Book:

Quickly gain the insight necessary to address a multitude of Java coding challenges using this succinct reference guide. Short, focused code examples will help you master Java elements such as modules, boxing/unboxing and more.

You won’t find any technical jargon, bloated samples, drawn out history lessons or witty stories in this book. What you will find is a language reference that is concise, to the point and highly accessible. The book is packed with useful information and is a must-have for any Java programmer.

What You Will Learn

  • Code with Java modules
  • Box/unbox 
  • Utilize exception handling

Who This Book Is For

Those with prior experience with Java who want a quick and handy reference. 

About the Author:

Mikael Olsson is a professional web entrepreneur, programmer, and author. He works for an R&D company in Finland where he specializes in software development. In his spare time he writes books and creates websites that summarize various fields of interest. The books he writes are focused on teaching their subject in the most efficient way possible, by explaining only what is relevant and practical without any unnecessary repetition or theory. The portal to his online businesses and other websites is Siforia.com.

Book Details:

  • ASIN : B079BKJ6CB
  • Publisher : Apress; 2nd edition (January 25, 2018)
  • Publication date : January 25, 2018
  • Print length : 113 pages

Table of Contents:

  1. Cover
  2. Front Matter
  3. 1. Hello World
  4. 2. Compile and Run
  5. 3. Variables
  6. 4. Operators
  7. 5. String
  8. 6. Arrays
  9. 7. Conditionals
  10. 8. Loops
  11. 9. Methods
  12. 10. Class
  13. 11. Static
  14. 12. Inheritance
  15. 13. Overriding
  16. 14. Packages and Import
  17. 15. Access Levels
  18. 16. Constants
  19. 17. Interface
  20. 18. Abstract
  21. 19. Enum
  22. 20. Exception Handling
  23. 21. Boxing and Unboxing
  24. 22. Generics
  25. 23. Lambda Expressions
  26. Back Matter

Sources:

Fair Use Sources:

Cover image
Categories
Bibliography Java Software Engineering

Think Java – How to Think Like a Computer Scientist

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Think Java – How to Think Like a Computer Scientist, 2nd Edition, by Allen B. Downey and Chris Mayfield, 2019, B08234FFCX (TnkJav)

Fair Use Source: B08234FFCX (TnkJav)

About This Book:

Currently used at many colleges, universities, and high schools, this hands-on introduction to computer science is ideal for people with little or no programming experience. The goal of this concise book is not just to teach you Java, but to help you think like a computer scientist. You’ll learn how to program—a useful skill by itself—but you’ll also discover how to use programming as a means to an end.

Authors Allen Downey and Chris Mayfield start with the most basic concepts and gradually move into topics that are more complex, such as recursion and object-oriented programming. Each brief chapter covers the material for one week of a college course and includes exercises to help you practice what you’ve learned.

  • Learn one concept at a time: tackle complex topics in a series of small steps with examples
  • Understand how to formulate problems, think creatively about solutions, and write programs clearly and accurately
  • Determine which development techniques work best for you, and practice the important skill of debugging
  • Learn relationships among input and output, decisions and loops, classes and methods, strings and arrays
  • Work on exercises involving word games, graphics, puzzles, and playing cards

The updated second edition of Think Java also features new chapters on polymorphism and data processing, as well as content covering changes through Java 12.

About the Authors:

Allen B. Downey is a Professor of Computer Science at Olin College of Engineering. He has taught at Wellesley College, Colby College, and U.C. Berkeley. He has a Ph.D. in Computer Science from U.C. Berkeley, and Master’s and Bachelor’s degrees from MIT. Downey is the creator of the bestselling Think series for O’Reilly, including Think Python, Think Complexity, Think DSP, and Think Bayes.

Chris Mayfield is an Assistant Professor of Computer Science at James Madison University, with a research focus on CS education and professional development. He has a Ph.D. in Computer Science from Purdue University and Bachelor’s degrees in CS and German from the University of Utah. https://github.com/ChrisMayfield and https://w3.cs.jmu.edu/mayfiecs

Publisher Resources

Book Details:

  • ASIN : B08234FFCX
  • Publisher : O’Reilly Media; 2nd edition (November 27, 2019)
  • Publication date : November 27, 2019
  • Print length : 328 pages

Table of Contents:

Table of Contents

  1. Preface
    1. The Philosophy Behind the Book
    2. Object-Oriented Programming
    3. Changes to the Second Edition
    4. About the Appendixes
    5. Using the Code Examples
    6. Conventions Used in This Book
    7. O’Reilly Online Learning
    8. How to Contact Us
    9. Acknowledgments
  2. 1. Computer Programming
    1. What Is a Computer?
    2. What Is Programming?
    3. The Hello World Program
    4. Compiling Java Programs
    5. Displaying Two Messages
    6. Formatting Source Code
    7. Using Escape Sequences
    8. What Is Computer Science?
    9. Debugging Programs
    10. Vocabulary
    11. Exercises
  3. 2. Variables and Operators
    1. Declaring Variables
    2. Assigning Variables
    3. Memory Diagrams
    4. Printing Variables
    5. Arithmetic Operators
    6. Floating-Point Numbers
    7. Rounding Errors
    8. Operators for Strings
    9. Compiler Error Messages
    10. Other Types of Errors
    11. Vocabulary
    12. Exercises
  4. 3. Input and Output
    1. The System Class
    2. The Scanner Class
    3. Language Elements
    4. Literals and Constants
    5. Formatting Output
    6. Reading Error Messages
    7. Type Cast Operators
    8. Remainder Operator
    9. Putting It All Together
    10. The Scanner Bug
    11. Vocabulary
    12. Exercises
  5. 4. Methods and Testing
    1. Defining New Methods
    2. Flow of Execution
    3. Parameters and Arguments
    4. Multiple Parameters
    5. Stack Diagrams
    6. Math Methods
    7. Composition
    8. Return Values
    9. Incremental Development
    10. Vocabulary
    11. Exercises
  6. 5. Conditionals and Logic
    1. Relational Operators
    2. The if-else Statement
    3. Chaining and Nesting
    4. The switch Statement
    5. Logical Operators
    6. De Morgan’s Laws
    7. Boolean Variables
    8. Boolean Methods
    9. Validating Input
    10. Example Program
    11. Vocabulary
    12. Exercises
  7. 6. Loops and Strings
    1. The while Statement
    2. Increment and Decrement
    3. The for Statement
    4. Nested Loops
    5. Characters
    6. Which Loop to Use
    7. String Iteration
    8. The indexOf Method
    9. Substrings
    10. String Comparison
    11. String Formatting
    12. Vocabulary
    13. Exercises
  8. 7. Arrays and References
    1. Creating Arrays
    2. Accessing Elements
    3. Displaying Arrays
    4. Copying Arrays
    5. Traversing Arrays
    6. Generating Random Numbers
    7. Building a Histogram
    8. The Enhanced for Loop
    9. Counting Characters
    10. Vocabulary
    11. Exercises
  9. 8. Recursive Methods
    1. Recursive Void Methods
    2. Recursive Stack Diagrams
    3. Value-Returning Methods
    4. The Leap of Faith
    5. Counting Up Recursively
    6. Binary Number System
    7. Recursive Binary Method
    8. CodingBat Problems
    9. Vocabulary
    10. Exercises
  10. 9. Immutable Objects
    1. Primitives Versus Objects
    2. The null Keyword
    3. Strings Are Immutable
    4. Wrapper Classes
    5. Command-Line Arguments
    6. Argument Validation
    7. BigInteger Arithmetic
    8. Incremental Design
    9. More Generalization
    10. Vocabulary
    11. Exercises
  11. 10. Mutable Objects
    1. Point Objects
    2. Objects as Parameters
    3. Objects as Return Values
    4. Rectangles Are Mutable
    5. Aliasing Revisited
    6. Java Library Source
    7. Class Diagrams
    8. Scope Revisited
    9. Garbage Collection
    10. Mutable Versus Immutable
    11. StringBuilder Objects
    12. Vocabulary
    13. Exercises
  12. 11. Designing Classes
    1. The Time Class
    2. Constructors
    3. Value Constructors
    4. Getters and Setters
    5. Displaying Objects
    6. The toString Method
    7. The equals Method
    8. Adding Times
    9. Vocabulary
    10. Exercises
  13. 12. Arrays of Objects
    1. Card Objects
    2. Card toString
    3. Class Variables
    4. The compareTo Method
    5. Cards Are Immutable
    6. Arrays of Cards
    7. Sequential Search
    8. Binary Search
    9. Tracing the Code
    10. Vocabulary
    11. Exercises
  14. 13. Objects of Arrays
    1. Decks of Cards
    2. Shuffling Decks
    3. Selection Sort
    4. Merge Sort
    5. Subdecks
    6. Merging Decks
    7. Adding Recursion
    8. Static Context
    9. Piles of Cards
    10. Playing War
    11. Vocabulary
    12. Exercises
  15. 14. Extending Classes
    1. CardCollection
    2. Inheritance
    3. Dealing Cards
    4. The Player Class
    5. The Eights Class
    6. Class Relationships
    7. Vocabulary
    8. Exercises
  16. 15. Arrays of Arrays
    1. Conway’s Game of Life
    2. The Cell Class
    3. Two-Dimensional Arrays
    4. The GridCanvas Class
    5. Other Grid Methods
    6. Starting the Game
    7. The Simulation Loop
    8. Exception Handling
    9. Counting Neighbors
    10. Updating the Grid
    11. Vocabulary
    12. Exercises
  17. 16. Reusing Classes
    1. Langton’s Ant
    2. Refactoring
    3. Abstract Classes
    4. UML Diagram
    5. Vocabulary
    6. Exercises
  18. 17. Advanced Topics
    1. Polygon Objects
    2. Adding Color
    3. Regular Polygons
    4. More Constructors
    5. An Initial Drawing
    6. Blinking Polygons
    7. Interfaces
    8. Event Listeners
    9. Timers
    10. Vocabulary
    11. Exercises
  19. A. Tools
    1. Installing DrJava
    2. DrJava Interactions
    3. Command-Line Interface
    4. Command-Line Testing
    5. Running Checkstyle
    6. Tracing with a Debugger
    7. Testing with JUnit
    8. Vocabulary
  20. B. Javadoc
    1. Reading Documentation
    2. Writing Documentation
    3. Javadoc Tags
    4. Example Source File
    5. Vocabulary
  21. C. Graphics
    1. Creating Graphics
    2. Graphics Methods
    3. Example Drawing
    4. Vocabulary
    5. Exercises
  22. D. Debugging
    1. Compile-Time Errors
      1. The compiler is spewing error messages.
      2. I’m getting a weird compiler message, and it won’t go away.
      3. I can’t get my program to compile no matter what I do.
      4. I did what the compiler told me to do, but it still doesn’t work.
    2. Run-Time Errors
      1. My program hangs.
      2. When I run the program, I get an exception.
      3. I added so many print statements I get inundated with output.
    3. Logic Errors
      1. My program doesn’t work.
      2. I’ve got a big, hairy expression and it doesn’t do what I expect.
      3. My method doesn’t return what I expect.
      4. My print statement isn’t doing anything.
      5. I’m really, really stuck and I need help.
      6. No, I really need help.
      7. I found the bug!
  23. Index

Sources:

Fair Use Sources:

Categories
Bibliography Java Software Engineering

Java for Absolute Beginners, by Iuliana Cosmina

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Java for Absolute Beginners – Learn to Program the Fundamentals the Java 9+ Way, by Iuliana Cosmina, 2018, B07L5C7GHH (JvAbBgn)

Fair Use Source: B07L5C7GHH (JvAbBgn)

About This Book:

Write your first code in Java using simple, step-by-step examples that model real-word objects and events, making learning easy. With this book you’ll be able to pick up the concepts without fuss. Java for Absolute Beginners teaches Java development in language anyone can understand, giving you the best possible start. You’ll see clear code descriptions and layout so that you can get your code running as soon as possible. After reading this book, you’ll come away with the basics to get started writing programs in Java.

Author Iuliana Cosmina focuses on practical knowledge and getting up to speed quickly—all the bits and pieces a novice needs to get started programming in Java. First, you’ll discover how Java is executed, what type of language it is, and what it is good for. With the theory out of the way, you’ll install Java, choose an editor such as IntelliJ IDEA, and write your first simple Java program. Along the way you’ll compile and execute this program so it can run on any platform that supports Java. As part of this tutorial you’ll see how to write high-quality code by following conventions and respecting well-known programming principles, making your projects more professional and efficient.

Finally, alongside the core features of Java, you’ll learn skills in some of the newest and most exciting features of the language: Generics, Lambda expressions, modular organization, local-variable type inference, and local variable syntax for Lambda expressions.

Java for Absolute Beginners gives you all you need to start your Java 9+ programming journey. No experience necessary.

 What You’ll Learn

  • Use data types, operators, and the new stream API
  • Install and use a build tool such as Gradle
  • Build interactive Java applications with JavaFX 
  • Exchange data using the new JSON APIs 
  • Play with images using multi-resolution APIs
  • Use the publish-subscribe framework

Who This Book Is For

Those who are new to programming and who want to start with Java.

About the Author:

Iuliana Cosmina is currently a Software Engineer for NCR Edinburgh. She has been writing Java code since 2002 and contributed to various types of applications such as experimental search engines, ERPs, track and trace, and banking. During her career, she has been a teacher, a team leader, software architect, DevOps professional and software manager. She is a Spring-certified Professional, as defined by Pivotal, the makers of Spring Framework, Boot, and other tools, and considers Spring the best Java framework to work with. When she is not programming, she spends her time reading, blogging, learning to play piano, travelling, hiking or biking.

Book Details:

  • ASIN : B07L5C7GHH
  • Publisher : Apress; 1st ed. edition (December 5, 2018)
  • Publication date : December 5, 2018
  • Print length : 702 pages

Table of Contents:

Table of Contents

New Version for 2021:

Write your first code in Java 17 using simple, step-by-step examples that model real-word objects and events, making learning easy. With Java 17 for Absolute Beginners  you’ll be able to pick up the concepts without fuss. It teaches Java development in language anyone can understand, giving you the best possible start. 

You’ll see clear code descriptions and layout so that you can get your code running as soon as possible. Author Iuliana Cosmina focuses on practical knowledge and getting you up to speed quickly—all the bits and pieces a novice needs to get started programming in Java. 

First, you’ll discover what type of language Java is, what it is good for, and how it is executed. With the theory out of the way, you’ll install Java, choose an editor such as IntelliJ IDEA, and write your first simple Java program. Along the way you’ll compile and execute this program so it can run on any platform that supports Java. As part of this tutorial you’ll see how to write high-quality code by following conventions and respecting well-known programming principles, making your projects more professional and efficient. 

Java 17 for Absolute Beginners gives you all you need to start your Java programming journey. No experience necessary. After reading this book, you’ll come away with the basics to get started writing programs in Java.\

https://apress.com/us/book/9781484270790 and https://smile.amazon.com/Java-Absolute-Beginners-Fundamentals-Programming/dp/1484270797

 What You Will Learn

  • Get started with Java 17 from scratch
  • Install and use the IntelliJ IDEA and the Gradle build tool
  • Exchange data using the new JSON APIs 
  • Play with images using multi-resolution APIs
  • Implement the publish-subscribe architecture

Sources:

Fair Use Sources:

Cover image
Categories
Bibliography Java Software Engineering

OCA Java SE 11 Programmer I Certification Guide, Exam 1Z0-815, by Mala Gupta

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

OCA Java SE 11 Programmer I Certification Guide, Exam 1Z0-815, by Mala Gupta, 2021, 9781617297465 (OCA11Gup)

About This Book:

OCP Java SE 11 Programmer I Certification Guide prepares you for the 1Z0-815 certification test with complete coverage of the exam. You’ll explore important Java topics as you systematically learn what’s required to pass. Memorable analogies, fun visual aids, and sample questions make sure your knowledge sticks and is easy to recall when you are sitting for the exam. In its third edition, this book has been proven effective by thousands of now-certified Java developers.

about the technology

After more than twenty years, Java is still one of the world’s most popular languages and in great demand from employers. Java certifications tell hiring managers that you know your stuff, and cracking the OCP Java SE 11 Programmer I Certification is no easy task. To earn your certification you’ll not only need to know your Java inside and out, you’ll need to understand the test itself. This book reviews the Java you’ll need as it walks you through questions and exercises like the ones you’ll see on test day.

about the book

OCP Java SE 11 Programmer I Certification Guide prepares you for the 1Z0-815 with complete and thorough coverage of the exam topics. Each chapter starts with a list of exam objectives mapped to section numbers, followed by sample questions and exercises that reinforce key concepts. Complex topics are explained through analogies, visual aids, and comic strips that you can easily remember under exam conditions. Specially designed “Twist in the Tale” exercises help you reevaluate and modify code to answer wild card exam questions you’ve not previously prepared for. You’ll also get the scoop on common exam mistakes and ways to avoid traps and pitfalls. With this book as your study guide, you’ll be ready and confident on test day.

what’s inside

  • Complete coverage of the OCP Java SE 11 Programmer I exam
  • Hands-on coding exercises
  • Behind the scenes with classes in Java APIs
  • How to avoid built-in traps and pitfalls
  • Sample questions written in the exam format

about the reader

For beginning to intermediate Java programmers studying to become an Oracle Certified Java Professional.

About the Author:

Mala Gupta is a Java coach and trainer who holds multiple Java certifications. Since 2006 she has been actively supporting Java certification as a path to career advancement.

Book Details:

Table of Contents:

  1. Introduction
  2. Java basics
  3. Working with Java data types
  4. Methods and encapsulation
  5. Selected classes from the Java API and arrays
  6. Flow control
  7. Working with inheritance
  8. Exception handling
  9. Full mock exam

Sources:

Fair Use Sources:

Categories
Bibliography Java Software Engineering

OCA Java SE 8 Programmer I Certification Guide, by Mala Gupta

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

OCA Java SE 8 Programmer I Certification Guide, by Mala Gupta, 2016, 1617293253 (OCA8Gup)

Fair Use Source: 1617293253 (OCA8Gup)

About This Book:

OCA Java SE 8 Programmer I Certification Guide prepares you for the 1Z0-808 with complete coverage of the exam. You’ll explore important Java topics as you systematically learn what’s required to successfully pass the test.

To earn the OCA Java SE 8 Programmer I Certification, you have to know your Java inside and out, and to pass the exam you need to understand the test itself. This book cracks open the questions, exercises, and expectations you’ll face on the OCA exam so you’ll be ready and confident on test day.

OCA Java SE 8 Programmer I Certification Guide prepares Java developers for the 1Z0-808 with thorough coverage of Java topics typically found on the exam. Each chapter starts with a list of exam objectives mapped to section numbers, followed by sample questions and exercises that reinforce key concepts. You’ll learn techniques and concepts in multiple ways, including memorable analogies, diagrams, flowcharts, and lots of well-commented code. You’ll also get the scoop on common exam mistakes and ways to avoid traps and pitfalls.

What’s Inside

  • Covers all exam topics
  • Hands-on coding exercises
  • Flowcharts, UML diagrams, and other visual aids
  • How to avoid built-in traps and pitfalls
  • Complete coverage of the OCA Java SE 8 Programmer I exam (1Z0-808)

About the Reader

Written for developers with a working knowledge of Java who want to earn the OCA Java SE 8 Programmer I Certification.

About the Author:

Mala Gupta is a Java coach and trainer who holds multiple Java certifications. Since 2006 she has been actively supporting Java certification as a path to career advancement.

Book Details:

Table of Contents:

Copyright
Brief Table of Contents
Table of Contents
Preface
Acknowledgments
About this Book
About the Author
About the Cover Illustration
Introduction
Chapter 1. Java basics
Chapter 2. Working with Java data types
Chapter 3. Methods and encapsulation
Chapter 4. Selected classes from the Java API and arrays
Chapter 5. Flow control
Chapter 6. Working with inheritance
Chapter 7. Exception handling
Chapter 8. Full mock exam
Appendix. Answers to Twist in the Tale exercises
Index
List of Figures
List of Tables

Sources:

Fair Use Sources:

Categories
Java Software Engineering

CodeRanch.com

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

A friendly place for programming greenhorns

Jump straight into any of our topics and light hearted discussions. Ranging from
java, databases, android, programmer certification, programming jobs and much more…

Java: Find Java topics ranging from beginner’s questions to core Java, features in Java releases, Servlets and JSP, networking, I/O, GUIs with Swing or JavaFX, and more including game development!
Books: Discussions of books and lots of book reviews. You can even contribute your own book review. We even stick in software reviews and upcoming events.
Mobile: Programming for that chip in your life! Join programming discussions on portable devices, iOS vs Android, Mobile apps, UI advice, API guidance and App Store approval hints and tips.

Sources:

Fair Use Sources:

Categories
Bibliography Java Software Engineering

Java – The Complete Reference, by Herbert Schildt

See also: Java – A Beginner’s Guide, Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Java: The Complete Reference, 11th Edition, by Herbert Schildt, 2018, B07KSQ9RKF (JvCmRf)

Fair Use Source: B07KSQ9RKF (JvCmRf)

About This Book:

The Definitive Java Programming Guide – Fully updated for Java SE 11, Java: The Complete Reference, Eleventh Edition explains how to develop, compile, debug, and run Java programs. Best-selling 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, JavaBeans, and servlets are examined and numerous examples demonstrate Java in action. Of course, the very important module system is discussed in detail. This Oracle Press resource also offers an introduction to JShell, Java’s interactive programming tool. Best of all, the book is written in the clear, crisp, uncompromising style that has made Schildt the choice of millions worldwide.
Coverage includes:

  • Data types, variables, arrays, and operators
  • Control statements
  • Classes, objects, and methods
  • Method overloading and overriding
  • Inheritance
  • Local variable type inference
  • 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
  • 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.

About the Author:

Herbert Schildt is one of the world’s leading programming authors and has written extensively on Java, C, C++, and C#. His books have sold millions of copies worldwide. Herb’s acclaimed books include Java: The Complete Reference, Java: A Beginner’s Guide, C: The Complete Reference, C++: The Complete Reference and C#: The Complete Reference.  

Book Details:

  • ASIN : B07KSQ9RKF
  • Publisher : McGraw-Hill Education; 11th edition (December 14, 2018)
  • Publication date : December 14, 2018
  • Print length : 1248 pages
  • Page numbers source ISBN : 9390491622

Table of Contents:

Table of Contents

Part I The Java Language

  1. Chapter 1 The History and Evolution of Java
    1. Java’s Lineage
      1. The Birth of Modern Programming: C
      2. C++: The Next Step
      3. The Stage Is Set for Java
    2. The Creation of Java
      1. The C# Connection
    3. How Java Impacted the Internet
      1. Java Applets
      2. Security
      3. Portability
    4. Java’s Magic: The Bytecode
    5. Moving Beyond Applets
    6. A Faster Release Schedule
    7. Servlets: Java on the Server Side
    8. The Java Buzzwords
      1. Simple
      2. Object-Oriented
      3. Robust
      4. Multithreaded
      5. Architecture-Neutral
      6. Interpreted and High Performance
      7. Distributed
      8. Dynamic
    9. The Evolution of Java
    10. A Culture of Innovation
  2. Chapter 2 An Overview of Java
    1. Object-Oriented Programming
      1. Two Paradigms
      2. Abstraction
      3. The Three OOP Principles
    2. A First Simple Program
      1. Entering the Program
      2. Compiling the Program
      3. A Closer Look at the First Sample Program
    3. A Second Short Program
    4. Two Control Statements
      1. The if Statement
      2. The for Loop
    5. Using Blocks of Code
    6. Lexical Issues
      1. Whitespace
      2. Identifiers
      3. Literals
      4. Comments
      5. Separators
      6. The Java Keywords
    7. The Java Class Libraries
  3. Chapter 3 Data Types, Variables, and Arrays
    1. Java Is a Strongly Typed Language
    2. The Primitive Types
    3. Integers
      1. byte
      2. short
      3. int
      4. long
    4. Floating-Point Types
      1. float
      2. double
    5. Characters
    6. Booleans
    7. A Closer Look at Literals
      1. Integer Literals
      2. Floating-Point Literals
      3. Boolean Literals
      4. Character Literals
      5. String Literals
    8. Variables
      1. Declaring a Variable
      2. Dynamic Initialization
      3. The Scope and Lifetime of Variables
    9. Type Conversion and Casting
      1. Java’s Automatic Conversions
      2. Casting Incompatible Types
    10. Automatic Type Promotion in Expressions
      1. The Type Promotion Rules
    11. Arrays
      1. One-Dimensional Arrays
      2. Multidimensional Arrays
      3. Alternative Array Declaration Syntax
    12. Introducing Type Inference with Local Variables
      1. Some var Restrictions
    13. A Few Words About Strings
  4. Chapter 4 Operators
    1. Arithmetic Operators
      1. The Basic Arithmetic Operators
      2. The Modulus Operator
      3. Arithmetic Compound Assignment Operators
      4. Increment and Decrement
    2. The Bitwise Operators
      1. The Bitwise Logical Operators
      2. The Left Shift
      3. The Right Shift
      4. The Unsigned Right Shift
      5. Bitwise Operator Compound Assignments
    3. Relational Operators
    4. Boolean Logical Operators
      1. Short-Circuit Logical Operators
    5. The Assignment Operator
    6. The ? Operator
    7. Operator Precedence
    8. Using Parentheses
  5. Chapter 5 Control Statements
    1. Java’s Selection Statements
      1. if
      2. switch
    2. Iteration Statements
      1. while
      2. do-while
      3. for
      4. The For-Each Version of the for Loop
      5. Local Variable Type Inference in a for Loop
      6. Nested Loops
    3. Jump Statements
      1. Using break
      2. Using continue
  6. Chapter 6 Introducing Classes
    1. Class Fundamentals
      1. The General Form of a Class
      2. A Simple Class
    2. Declaring Objects
      1. A Closer Look at new
    3. Assigning Object Reference Variables
    4. Introducing Methods
      1. Adding a Method to the Box Class
      2. Returning a Value
      3. Adding a Method That Takes Parameters
    5. Constructors
      1. Parameterized Constructors
    6. The this Keyword
      1. Instance Variable Hiding
    7. Garbage Collection
    8. A Stack Class
  7. Chapter 7 A Closer Look at Methods and Classes
    1. Overloading Methods
      1. Overloading Constructors
    2. Using Objects as Parameters
    3. A Closer Look at Argument Passing
    4. Returning Objects
    5. Recursion
    6. Introducing Access Control
    7. Understanding static
    8. Introducing final
    9. Arrays Revisited
    10. Introducing Nested and Inner Classes
    11. Exploring the String Class
    12. Using Command-Line Arguments
    13. Varargs: Variable-Length Arguments
      1. Overloading Vararg Methods
      2. Varargs and Ambiguity
    14. Local Variable Type Inference with Reference Types
  8. Chapter 8 Inheritance
    1. Inheritance Basics
      1. Member Access and Inheritance
      2. A More Practical Example
      3. A Superclass Variable Can Reference a Subclass Object
    2. Using super
      1. Using super to Call Superclass Constructors
      2. A Second Use for super
    3. Creating a Multilevel Hierarchy
    4. When Constructors Are Executed
    5. Method Overriding
    6. Dynamic Method Dispatch
      1. Why Overridden Methods?
      2. Applying Method Overriding
    7. Using Abstract Classes
    8. Using final with Inheritance
      1. Using final to Prevent Overriding
      2. Using final to Prevent Inheritance
    9. Local Variable Type Inference and Inheritance
    10. The Object Class
  9. Chapter 9 Packages and Interfaces
    1. Packages
      1. Defining a Package
      2. Finding Packages and CLASSPATH
      3. A Short Package Example
    2. Packages and Member Access
      1. An Access Example
    3. Importing Packages
    4. Interfaces
      1. Defining an Interface
      2. Implementing Interfaces
      3. Nested Interfaces
      4. Applying Interfaces
      5. Variables in Interfaces
      6. Interfaces Can Be Extended
    5. Default Interface Methods
      1. Default Method Fundamentals
      2. A More Practical Example
      3. Multiple Inheritance Issues
    6. Use static Methods in an Interface
    7. Private Interface Methods
    8. Final Thoughts on Packages and Interfaces
  10. Chapter 10 Exception Handling
    1. Exception-Handling Fundamentals
    2. Exception Types
    3. Uncaught Exceptions
    4. Using try and catch
      1. Displaying a Description of an Exception
    5. Multiple catch Clauses
    6. Nested try Statements
    7. throw
    8. throws
    9. finally
    10. Java’s Built-in Exceptions
    11. Creating Your Own Exception Subclasses
    12. Chained Exceptions
    13. Three Additional Exception Features
    14. Using Exceptions
  11. Chapter 11 Multithreaded Programming
    1. The Java Thread Model
      1. Thread Priorities
      2. Synchronization
      3. Messaging
      4. The Thread Class and the Runnable Interface
    2. The Main Thread
    3. Creating a Thread
      1. Implementing Runnable
      2. Extending Thread
      3. Choosing an Approach
    4. Creating Multiple Threads
    5. Using isAlive( ) and join( )
    6. Thread Priorities
    7. Synchronization
      1. Using Synchronized Methods
      2. The synchronized Statement
    8. Interthread Communication
      1. Deadlock
    9. Suspending, Resuming, and Stopping Threads
    10. Obtaining a Thread’s State
    11. Using a Factory Method to Create and Start a Thread
    12. Using Multithreading
  12. Chapter 12 Enumerations, Autoboxing, and Annotations
    1. Enumerations
      1. Enumeration Fundamentals
      2. The values( ) and valueOf( ) Methods
      3. Java Enumerations Are Class Types
      4. Enumerations Inherit Enum
      5. Another Enumeration Example
    2. Type Wrappers
      1. Character
      2. Boolean
      3. The Numeric Type Wrappers
    3. Autoboxing
      1. Autoboxing and Methods
      2. Autoboxing/Unboxing Occurs in Expressions
      3. Autoboxing/Unboxing Boolean and Character Values
      4. Autoboxing/Unboxing Helps Prevent Errors
      5. A Word of Warning
    4. Annotations
      1. Annotation Basics
      2. Specifying a Retention Policy
      3. Obtaining Annotations at Run Time by Use of Reflection
      4. The AnnotatedElement Interface
      5. Using Default Values
      6. Marker Annotations
      7. Single-Member Annotations
      8. The Built-In Annotations
    5. Type Annotations
    6. Repeating Annotations
    7. Some Restrictions
  13. Chapter 13 I/O, Try-with-Resources, and Other Topics
    1. I/O Basics
      1. Streams
      2. Byte Streams and Character Streams
      3. The Predefined Streams
    2. Reading Console Input
      1. Reading Characters
      2. Reading Strings
    3. Writing Console Output
    4. The PrintWriter Class
    5. Reading and Writing Files
    6. Automatically Closing a File
    7. The transient and volatile Modifiers
    8. Using instanceof
    9. strictfp
    10. Native Methods
    11. Using assert
      1. Assertion Enabling and Disabling Options
    12. Static Import
    13. Invoking Overloaded Constructors Through this( )
    14. A Word About Compact API Profiles
  14. Chapter 14 Generics
    1. What Are Generics?
    2. A Simple Generics Example
      1. Generics Work Only with Reference Types
      2. Generic Types Differ Based on Their Type Arguments
      3. How Generics Improve Type Safety
    3. A Generic Class with Two Type Parameters
    4. The General Form of a Generic Class
    5. Bounded Types
    6. Using Wildcard Arguments
      1. Bounded Wildcards
    7. Creating a Generic Method
      1. Generic Constructors
    8. Generic Interfaces
    9. Raw Types and Legacy Code
    10. Generic Class Hierarchies
      1. Using a Generic Superclass
      2. A Generic Subclass
      3. Run-Time Type Comparisons Within a Generic Hierarchy
      4. Casting
      5. Overriding Methods in a Generic Class
    11. Type Inference with Generics
    12. Local Variable Type Inference and Generics
    13. Erasure
      1. Bridge Methods
    14. Ambiguity Errors
    15. Some Generic Restrictions
      1. Type Parameters Can’t Be Instantiated
      2. Restrictions on Static Members
      3. Generic Array Restrictions
      4. Generic Exception Restriction
  15. Chapter 15 Lambda Expressions
    1. Introducing Lambda Expressions
      1. Lambda Expression Fundamentals
      2. Functional Interfaces
      3. Some Lambda Expression Examples
    2. Block Lambda Expressions
    3. Generic Functional Interfaces
    4. Passing Lambda Expressions as Arguments
    5. Lambda Expressions and Exceptions
    6. Lambda Expressions and Variable Capture
    7. Method References
      1. Method References to static Methods
      2. Method References to Instance Methods
      3. Method References with Generics
    8. Constructor References
    9. Predefined Functional Interfaces
  16. Chapter 16 Modules
    1. Module Basics
      1. A Simple Module Example
      2. Compile and Run the First Module Example
      3. A Closer Look at requires and exports
    2. java.base and the Platform Modules
    3. Legacy Code and the Unnamed Module
    4. Exporting to a Specific Module
    5. Using requires transitive
    6. Use Services
      1. Service and Service Provider Basics
      2. The Service-Based Keywords
      3. A Module-Based Service Example
    7. Module Graphs
    8. Three Specialized Module Features
      1. Open Modules
      2. The opens Statement
      3. requires static
    9. Introducing jlink and Module JAR Files
      1. Linking Files in an Exploded Directory
      2. Linking Modular JAR Files
      3. JMOD Files
    10. A Brief Word About Layers and Automatic Modules
    11. Final Thoughts on Modules

Part II The Java Library

  1. Chapter 17 String Handling
    1. The String Constructors
    2. String Length
    3. Special String Operations
      1. String Literals
      2. String Concatenation
      3. String Concatenation with Other Data Types
      4. String Conversion and toString( )
    4. Character Extraction
      1. charAt( )
      2. getChars( )
      3. getBytes( )
      4. toCharArray( )
    5. String Comparison
      1. equals( ) and equalsIgnoreCase( )
      2. regionMatches( )
      3. startsWith( ) and endsWith( )
      4. equals( ) Versus ==
      5. compareTo( )
    6. Searching Strings
    7. Modifying a String
      1. substring( )
      2. concat( )
      3. replace( )
      4. trim( ) and strip( )
    8. Data Conversion Using valueOf( )
    9. Changing the Case of Characters Within a String
    10. Joining Strings
    11. Additional String Methods
    12. StringBuffer
      1. StringBuffer Constructors
      2. length( ) and capacity( )
      3. ensureCapacity( )
      4. setLength( )
      5. charAt( ) and setCharAt( )
      6. getChars( )
      7. append( )
      8. insert( )
      9. reverse( )
      10. delete( ) and deleteCharAt( )
      11. replace( )
      12. substring( )
      13. Additional StringBuffer Methods
    13. StringBuilder
  2. Chapter 18 Exploring java.lang
    1. Primitive Type Wrappers
      1. Number
      2. Double and Float
      3. Understanding isInfinite( ) and isNaN( )
      4. Byte, Short, Integer, and Long
      5. Character
      6. Additions to Character for Unicode Code Point Support
      7. Boolean
    2. Void
    3. Process
    4. Runtime
      1. Memory Management
      2. Executing Other Programs
    5. Runtime.Version
    6. ProcessBuilder
    7. System
      1. Using currentTimeMillis( ) to Time Program Execution
      2. Using arraycopy( )
      3. Environment Properties
    8. System.Logger and System.LoggerFinder
    9. Object
    10. Using clone( ) and the Cloneable Interface
    11. Class
    12. ClassLoader
    13. Math
      1. Trigonometric Functions
      2. Exponential Functions
      3. Rounding Functions
      4. Miscellaneous Math Methods
    14. StrictMath
    15. Compiler
    16. Thread, ThreadGroup, and Runnable
      1. The Runnable Interface
      2. Thread
      3. ThreadGroup
    17. ThreadLocal and InheritableThreadLocal
    18. Package
    19. Module
    20. ModuleLayer
    21. RuntimePermission
    22. Throwable
    23. SecurityManager
    24. StackTraceElement
    25. StackWalker and StackWalker.StackFrame
    26. Enum
    27. ClassValue
    28. The CharSequence Interface
    29. The Comparable Interface
    30. The Appendable Interface
    31. The Iterable Interface
    32. The Readable Interface
    33. The AutoCloseable Interface
    34. The Thread.UncaughtExceptionHandler Interface
    35. The java.lang Subpackages
      1. java.lang.annotation
      2. java.lang.instrument
      3. java.lang.invoke
      4. java.lang.management
      5. java.lang.module
      6. java.lang.ref
      7. java.lang.reflect
  3. Chapter 19 java.util Part 1: The Collections Framework
    1. Collections Overview
    2. The Collection Interfaces
      1. The Collection Interface
      2. The List Interface
      3. The Set Interface
      4. The SortedSet Interface
      5. The NavigableSet Interface
      6. The Queue Interface
      7. The Deque Interface
    3. The Collection Classes
      1. The ArrayList Class
      2. The LinkedList Class
      3. The HashSet Class
      4. The LinkedHashSet Class
      5. The TreeSet Class
      6. The PriorityQueue Class
      7. The ArrayDeque Class
      8. The EnumSet Class
    4. Accessing a Collection via an Iterator
      1. Using an Iterator
      2. The For-Each Alternative to Iterators
    5. Spliterators
    6. Storing User-Defined Classes in Collections
    7. The RandomAccess Interface
    8. Working with Maps
      1. The Map Interfaces
      2. The Map Classes
    9. Comparators
      1. Using a Comparator
    10. The Collection Algorithms
    11. Arrays
    12. The Legacy Classes and Interfaces
      1. The Enumeration Interface
      2. Vector
      3. Stack
      4. Dictionary
      5. Hashtable
      6. Properties
      7. Using store( ) and load( )
    13. Parting Thoughts on Collections
  4. Chapter 20 java.util Part 2: More Utility Classes
    1. StringTokenizer
    2. BitSet
    3. Optional, OptionalDouble, OptionalInt, and OptionalLong
    4. Date
    5. Calendar
    6. GregorianCalendar
    7. TimeZone
    8. SimpleTimeZone
    9. Locale
    10. Random
    11. Timer and TimerTask
    12. Currency
    13. Formatter
      1. The Formatter Constructors
      2. The Formatter Methods
      3. Formatting Basics
      4. Formatting Strings and Characters
      5. Formatting Numbers
      6. Formatting Time and Date
      7. The %n and %% Specifiers
      8. Specifying a Minimum Field Width
      9. Specifying Precision
      10. Using the Format Flags
      11. Justifying Output
      12. The Space, +, 0, and ( Flags
      13. The Comma Flag
      14. The # Flag
      15. The Uppercase Option
      16. Using an Argument Index
      17. Closing a Formatter
      18. The Java printf( ) Connection
    14. Scanner
      1. The Scanner Constructors
      2. Scanning Basics
      3. Some Scanner Examples
      4. Setting Delimiters
      5. Other Scanner Features
    15. The ResourceBundle, ListResourceBundle, and PropertyResourceBundle Classes
    16. Miscellaneous Utility Classes and Interfaces
    17. The java.util Subpackages
      1. java.util.concurrent, java.util.concurrent.atomic, and java.util.concurrent.locks
      2. java.util.function
      3. java.util.jar
      4. java.util.logging
      5. java.util.prefs
      6. java.util.regex
      7. java.util.spi
      8. java.util.stream
      9. java.util.zip
  5. Chapter 21 Input/Output: Exploring java.io
    1. The I/O Classes and Interfaces
    2. File
      1. Directories
      2. Using FilenameFilter
      3. The listFiles( ) Alternative
      4. Creating Directories
    3. The AutoCloseable, Closeable, and Flushable Interfaces
    4. I/O Exceptions
    5. Two Ways to Close a Stream
    6. The Stream Classes
    7. The Byte Streams
      1. InputStream
      2. OutputStream
      3. FileInputStream
      4. FileOutputStream
      5. ByteArrayInputStream
      6. ByteArrayOutputStream
      7. Filtered Byte Streams
      8. Buffered Byte Streams
      9. SequenceInputStream
      10. PrintStream
      11. DataOutputStream and DataInputStream
      12. RandomAccessFile
    8. The Character Streams
      1. Reader
      2. Writer
      3. FileReader
      4. FileWriter
      5. CharArrayReader
      6. CharArrayWriter
      7. BufferedReader
      8. BufferedWriter
      9. PushbackReader
      10. PrintWriter
    9. The Console Class
    10. Serialization
      1. Serializable
      2. Externalizable
      3. ObjectOutput
      4. ObjectOutputStream
      5. ObjectInput
      6. ObjectInputStream
      7. A Serialization Example
    11. Stream Benefits
  6. Chapter 22 Exploring NIO
    1. The NIO Classes
    2. NIO Fundamentals
      1. Buffers
      2. Channels
      3. Charsets and Selectors
    3. Enhancements Added by NIO.2
      1. The Path Interface
      2. The Files Class
      3. The Paths Class
      4. The File Attribute Interfaces
      5. The FileSystem, FileSystems, and FileStore Classes
    4. Using the NIO System
      1. Use NIO for Channel-Based I/O
      2. Use NIO for Stream-Based I/O
      3. Use NIO for Path and File System Operations
  7. Chapter 23 Networking
    1. Networking Basics
    2. The java.net Networking Classes and Interfaces
    3. InetAddress
      1. Factory Methods
      2. Instance Methods
    4. Inet4Address and Inet6Address
    5. TCP/IP Client Sockets
    6. URL
    7. URLConnection
    8. HttpURLConnection
    9. The URI Class
    10. Cookies
    11. TCP/IP Server Sockets
    12. Datagrams
      1. DatagramSocket
      2. DatagramPacket
      3. A Datagram Example
    13. Introducing java.net.http
      1. Three Key Elements
      2. A Simple HTTP Client Example
      3. Things to Explore in java.net.http
  8. Chapter 24 Event Handling
    1. Two Event Handling Mechanisms
    2. The Delegation Event Model
      1. Events
      2. Event Sources
      3. Event Listeners
    3. Event Classes
      1. The ActionEvent Class
      2. The AdjustmentEvent Class
      3. The ComponentEvent Class
      4. The ContainerEvent Class
      5. The FocusEvent Class
      6. The InputEvent Class
      7. The ItemEvent Class
    4. The KeyEvent Class
      1. The MouseEvent Class
      2. The MouseWheelEvent Class
      3. The TextEvent Class
      4. The WindowEvent Class
    5. Sources of Events
    6. Event Listener Interfaces
      1. The ActionListener Interface
      2. The AdjustmentListener Interface
      3. The ComponentListener Interface
      4. The ContainerListener Interface
      5. The FocusListener Interface
      6. The ItemListener Interface
      7. The KeyListener Interface
      8. The MouseListener Interface
      9. The MouseMotionListener Interface
      10. The MouseWheelListener Interface
      11. The TextListener Interface
      12. The WindowFocusListener Interface
      13. The WindowListener Interface
    7. Using the Delegation Event Model
      1. Some Key AWT GUI Concepts
      2. Handling Mouse Events
      3. Handling Keyboard Events
    8. Adapter Classes
    9. Inner Classes
      1. Anonymous Inner Classes
  9. Chapter 25 Introducing the AWT: Working with Windows, Graphics, and Text
    1. AWT Classes
    2. Window Fundamentals
      1. Component
      2. Container
      3. Panel
      4. Window
      5. Frame
      6. Canvas
    3. Working with Frame Windows
      1. Setting the Window’s Dimensions
      2. Hiding and Showing a Window
      3. Setting a Window’s Title
      4. Closing a Frame Window
      5. The paint( ) Method
      6. Displaying a String
      7. Setting the Foreground and Background Colors
      8. Requesting Repainting
      9. Creating a Frame-Based Application
    4. Introducing Graphics
      1. Drawing Lines
      2. Drawing Rectangles
      3. Drawing Ellipses and Circles
      4. Drawing Arcs
      5. Drawing Polygons
      6. Demonstrating the Drawing Methods
      7. Sizing Graphics
    5. Working with Color
      1. Color Methods
      2. Setting the Current Graphics Color
      3. A Color Demonstration Program
    6. Setting the Paint Mode
    7. Working with Fonts
      1. Determining the Available Fonts
      2. Creating and Selecting a Font
      3. Obtaining Font Information
    8. Managing Text Output Using FontMetrics
  10. Chapter 26 Using AWT Controls, Layout Managers, and Menus
    1. AWT Control Fundamentals
      1. Adding and Removing Controls
      2. Responding to Controls
      3. The HeadlessException
    2. Labels
    3. Using Buttons
      1. Handling Buttons
    4. Applying Check Boxes
      1. Handling Check Boxes
    5. CheckboxGroup
    6. Choice Controls
      1. Handling Choice Lists
    7. Using Lists
      1. Handling Lists
    8. Managing Scroll Bars
      1. Handling Scroll Bars
    9. Using a TextField
      1. Handling a TextField
    10. Using a TextArea
    11. Understanding Layout Managers
      1. FlowLayout
      2. BorderLayout
      3. Using Insets
      4. GridLayout
      5. CardLayout
      6. GridBagLayout
    12. Menu Bars and Menus
    13. Dialog Boxes
    14. A Word About Overriding paint( )
  11. Chapter 27 Images
    1. File Formats
    2. Image Fundamentals: Creating, Loading, and Displaying
      1. Creating an Image Object
      2. Loading an Image
      3. Displaying an Image
    3. Double Buffering
    4. ImageProducer
      1. MemoryImageSource
    5. ImageConsumer
      1. PixelGrabber
    6. ImageFilter
      1. CropImageFilter
      2. RGBImageFilter
    7. Additional Imaging Classes
  12. Chapter 28 The Concurrency Utilities
    1. The Concurrent API Packages
      1. java.util.concurrent
      2. java.util.concurrent.atomic
      3. java.util.concurrent.locks
    2. Using Synchronization Objects
      1. Semaphore
      2. CountDownLatch
      3. CyclicBarrier
      4. Exchanger
      5. Phaser
    3. Using an Executor
      1. A Simple Executor Example
      2. Using Callable and Future
    4. The TimeUnit Enumeration
    5. The Concurrent Collections
    6. Locks
    7. Atomic Operations
    8. Parallel Programming via the Fork/Join Framework
      1. The Main Fork/Join Classes
      2. The Divide-and-Conquer Strategy
      3. A Simple First Fork/Join Example
      4. Understanding the Impact of the Level of Parallelism
      5. An Example that Uses RecursiveTask<V>
      6. Executing a Task Asynchronously
      7. Cancelling a Task
      8. Determining a Task’s Completion Status
      9. Restarting a Task
      10. Things to Explore
      11. Some Fork/Join Tips
    9. The Concurrency Utilities Versus Java’s Traditional Approach
  13. Chapter 29 The Stream API
    1. Stream Basics
      1. Stream Interfaces
      2. How to Obtain a Stream
      3. A Simple Stream Example
    2. Reduction Operations
    3. Using Parallel Streams
    4. Mapping
    5. Collecting
    6. Iterators and Streams
      1. Use an Iterator with a Stream
      2. Use Spliterator
    7. More to Explore in the Stream API
  14. Chapter 30 Regular Expressions and Other Packages
    1. Regular Expression Processing
      1. Pattern
      2. Matcher
      3. Regular Expression Syntax
      4. Demonstrating Pattern Matching
      5. Two Pattern-Matching Options
      6. Exploring Regular Expressions
    2. Reflection
    3. Remote Method Invocation (RMI)
      1. A Simple Client/Server Application Using RMI
    4. Formatting Date and Time with java.text
      1. DateFormat Class
      2. SimpleDateFormat Class
    5. The java.time Time and Date API
      1. Time and Date Fundamentals
      2. Formatting Date and Time
      3. Parsing Date and Time Strings
      4. Other Things to Explore in java.time

Part III Introducing GUI Programming with Swing

  1. Chapter 31 Introducing Swing
    1. The Origins of Swing
    2. Swing Is Built on the AWT
    3. Two Key Swing Features
      1. Swing Components Are Lightweight
      2. Swing Supports a Pluggable Look and Feel
    4. The MVC Connection
    5. Components and Containers
      1. Components
      2. Containers
      3. The Top-Level Container Panes
    6. The Swing Packages
    7. A Simple Swing Application
    8. Event Handling
    9. Painting in Swing
      1. Painting Fundamentals
      2. Compute the Paintable Area
      3. A Paint Example
  2. Chapter 32 Exploring Swing
    1. JLabel and ImageIcon
    2. JTextField
    3. The Swing Buttons
      1. JButton
      2. JToggleButton
      3. Check Boxes
      4. Radio Buttons
    4. JTabbedPane
    5. JScrollPane
    6. JList
    7. JComboBox
    8. Trees
    9. JTable
  3. Chapter 33 Introducing Swing Menus
    1. Menu Basics
    2. An Overview of JMenuBar, JMenu, and JMenuItem
      1. JMenuBar
      2. JMenu
      3. JMenuItem
    3. Create a Main Menu
    4. Add Mnemonics and Accelerators to Menu Items
    5. Add Images and Tooltips to Menu Items
    6. Use JRadioButtonMenuItem and JCheckBoxMenuItem
    7. Create a Popup Menu
    8. Create a Toolbar
    9. Use Actions
    10. Put the Entire MenuDemo Program Together
    11. Continuing Your Exploration of Swing

Part IV Applying Java

  1. Chapter 34 Java Beans
    1. What Is a Java Bean?
    2. Advantages of Beans
    3. Introspection
      1. Design Patterns for Properties
      2. Design Patterns for Events
      3. Methods and Design Patterns
      4. Using the BeanInfo Interface
    4. Bound and Constrained Properties
    5. Persistence
    6. Customizers
    7. The JavaBeans API
      1. Introspector
      2. PropertyDescriptor
      3. EventSetDescriptor
      4. MethodDescriptor
    8. A Bean Example
  2. Chapter 35 Introducing Servlets
    1. Background
    2. The Life Cycle of a Servlet
    3. Servlet Development Options
    4. Using Tomcat
    5. A Simple Servlet
      1. Create and Compile the Servlet Source Code
      2. Start Tomcat
      3. Start a Web Browser and Request the Servlet
    6. The Servlet API
    7. The javax.servlet Package
      1. The Servlet Interface
      2. The ServletConfig Interface
      3. The ServletContext Interface
      4. The ServletRequest Interface
      5. The ServletResponse Interface
      6. The GenericServlet Class
      7. The ServletInputStream Class
      8. The ServletOutputStream Class
      9. The Servlet Exception Classes
    8. Reading Servlet Parameters
    9. The javax.servlet.http Package
      1. The HttpServletRequest Interface
      2. The HttpServletResponse Interface
      3. The HttpSession Interface
      4. The Cookie Class
      5. The HttpServlet Class
    10. Handling HTTP Requests and Responses
      1. Handling HTTP GET Requests
      2. Handling HTTP POST Requests
    11. Using Cookies
    12. Session Tracking

Part V Appendixes

  1. Appendix A Using Java’s Documentation Comments
    1. The javadoc Tags
      1. @author
      2. {@code}
      3. @deprecated
      4. {@docRoot}
      5. @exception
      6. @hidden
      7. {@index}
      8. {@inheritDoc}
      9. {@link}
      10. {@linkplain}
      11. {@literal}
      12. @param
      13. @provides
      14. @return
      15. @see
      16. @serial
      17. @serialData
      18. @serialField
      19. @since
      20. {@summary}
      21. @throws
      22. @uses
      23. {@value}
      24. @version
    2. The General Form of a Documentation Comment
    3. What javadoc Outputs
    4. An Example that Uses Documentation Comments
  2. Appendix B Introducing JShell
    1. JShell Basics
    2. List, Edit, and Rerun Code
    3. Add a Method
    4. Create a Class
    5. Use an Interface
    6. Evaluate Expressions and Use Built-in Variables
    7. Importing Packages
    8. Exceptions
    9. Some More JShell Commands
    10. Exploring JShell Further
  3. Appendix C Compile and Run Simple Single-File Programs in One Step

Index

Sources:

Fair Use Sources:

Categories
Java Software Engineering

Java documentation

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Whether you are working on a new cutting edge app or simply ramping up on new technology, Java documentation has all the information you need to make your project a smashing success. Use the rich set of code samples, tutorials, developer guides, API documentation, and more to quickly develop your prototype and scale it up to a real world application.

Java Platform, Standard Edition (Java SE)

Java SE lets you develop and deploy Java applications on desktops and servers. Java SE and component technologies offer the rich user interface, performance, versatility, portability, and security that today’s applications require.Java SE Documentation

Java Embedded

Java ME Embedded is designed for resource-constrained devices like wireless modules for M2M, industrial control, smart-grid infrastructure, environmental sensors and tracking, and more.Java ME Embedded documentationOracle Java SE Embedded delivers a secure, optimized runtime environment ideal for network-based devices.Oracle Java SE Embedded and JDK for ARM documentationJava Card technology provides a secure environment for applications that run on smart cards and other devices with very limited memory and processing capabilities. Java Card documentation

Java Platform, Enterprise Edition (Java EE)

Java EE provides an API and runtime environment for developing and running large, multi-tiered, reliable, and secure enterprise applications that are portable and scalable and that integrate easily with legacy applications and data.

Java EE documentation

Sources:

Fair Use Sources:

Categories
Java Software Engineering

Java Reference Materials

See also Java Bibliography, Java Programming Language or Java Glossary

Best Java programming reference books: Full list at Java Bibliography

Best reference sites for Java programming:

Sources:

Fair Use Sources:

Categories
Java Software Engineering

Java Bibliography

See also: Java Reference Materials, Java Programming Language or Java Glossary

  1. Java official documentation: https://docs.oracle.com/en/java (JavDoc)
  2. Learning Java, Fifth Edition, by Marc Loy, Patrick Niemeyer, and Daniel Leuck, 2020, 978-1-492-05627-0, B086L2NYWR (LerJav)
  3. Java: The Complete Reference, 11th Edition, by Herbert Schildt, 2018, B07KSQ9RKF (JvCmRf)
  4. Java in a Nutshell – A Desktop Quick Reference, 7th Edition, by Ben Evans and David Flanagan, 2018, B07L3BFG49 (JvNutSh)
  5. Java Pocket Guide – Instant Help for Java Programmers, 4th Edition, by Robert Liguori, 2017, B0756P3CZD (JvPktGd)
  6. Head First Java, 3rd Edition, by Kathy Sierra and Bert Bates, 2021, 1491910771 (HFJav)
  7. Java – A Beginner’s Guide, 8th Edition, by Herbert Schildt, 2018, B07J2ZZ29H (JvBgnGd)
  8. Effective Java, 3rd Edition, by Joshua Bloch, 2017, B078H61SCH (EftJav)
  9. Modern Java in Action – Lambdas, streams, functional and reactive programming, 2nd Edition, by Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft, 2018, 1617293563 (ModJavAc)
  10. Java Cookbook – Problems and Solutions for Java Developers, 4th Edition, by Ian F. Darwin, 2020, B08651PDL6 (JvCkbk)
  11. Java for Absolute Beginners – Learn to Program the Fundamentals the Java 9+ Way, by Iuliana Cosmina, 2018, B07L5C7GHH (JvAbBgn)
  12. Think Java – How to Think Like a Computer Scientist, 2nd Edition, by Allen B. Downey and Chris Mayfield, 2019, B08234FFCX (TnkJav)
  13. OCA Java SE 11 Programmer I Certification Guide, Exam 1Z0-815, by Mala Gupta, 2021, 9781617297465 (OCA11Gup)
  14. OCA Java SE 8 Programmer I Certification Guide, by Mala Gupta, 2016, 1617293253 (OCA8Gup)
  15. The Well-Grounded Java Developer, Second Edition, by Benjamin Evans, Jason Clark, and Martijn Verburg, 2021, 1617298875 (WelGrJvDv)
  16. Core Java – Volume I – Fundamentals, 11th Edition, by Cay S. Horstmann, 2020, B07G8DHTSZ (CorJav1)
  17. Core Java – Volume II – Advanced Features, 11th Edition, by Cay S. Horstmann, 2019, B07NCXJR1M (CorJav2)
  18. Java Quick Syntax Reference, 2nd Edition, by Mikael Olsson, 2018, B079BKJ6CB (JvQSynRf)
  19. Gosling, James; Joy, Bill; Steele, Guy; Bracha, Gilad; Buckley, Alex, 2014. The Java® Language Specification (PDF) (Java SE 8 ed.).
  20. Gosling, James; Joy, BillSteele, Guy L., Jr.Bracha, Gilad, 2005. The Java Language Specification (3rd ed.). Addison-Wesley. ISBN 0-321-24678-0.
  21. Lindholm, Tim; Yellin, Frank, 1999. The Java Virtual Machine Specification (2nd ed.). Addison-Wesley. ISBN 0-201-43294-3.

Sources:

Fair Use Sources:

Categories
Java Software Engineering

Java Glossary

See also Java Programming Language, Java Bibliography, Java Reference materials

” (LerJav)

abstract:

Java abstract keyword: “The Java abstract keyword is used to declare Java abstract methods and Java classes. An abstract method has no implementation defined; it is declared with Java arguments and a Java return type as usual, but the body enclosed in curly braces is replaced with a semicolon. The implementation of a Java abstract method is provided by a Java subclass of the Java class in which it is defined. If an abstract method appears in a class, the class is also abstract. Attempting to instantiate an abstract class will fail at compile time.” (LerJav)

annotations

Metadata added to Java source code using the @ tag syntax. Annotations can be used by the compiler or at runtime to augment classes, provide data or mappings, or flag additional services.

Ant

An older, XML-based build tool for Java applications. Ant builds can compile, package, and deploy Java source code as well as generate documentation and perform other activities through pluggable “targets.”

Application Programming Interface (API)

An API consists of the methods and variables programmers use to work with a component or tool in their applications. The Java language APIs consist of the classes and methods of the java.lang, java.util, java.io, java.text, java​.net packages and many others.

application

A Java program that runs standalone, as compared with an applet.

Annotation Processing Tool (APT)

A frontend for the Java compiler that processes annotations via a pluggable factory architecture, allowing users to implement custom compile-time annotations.

assertion

A language feature used to test for conditions that should be guaranteed by program logic. If a condition checked by an assertion is found to be false, a fatal error is thrown. For added performance, assertions can be disabled when an application is deployed.

atomic

Discrete or transactional in the sense that an operation happens as a unit, in an all-or-nothing fashion. Certain operations in the Java virtual machine (VM) and provided by the Java concurrency API are atomic.

Abstract Window Toolkit (AWT)

Java’s original platform-independent windowing, graphics, and UI toolkit.

Boojum

The mystical, spectral, alter ego of a Snark. From the 1876 Lewis Carroll poem “The Hunting of the Snark.”

Boolean

A primitive Java data type that contains a true or false value.

bounds

In Java generics, a limitation on the type of a type parameter. An upper bound specifies that a type must extend (or is assignable to) a specific Java class. A lower bound is used to indicate that a type must be a supertype of (or is assignable from) the specified type.

boxing

Wrapping of primitive types in Java by their object wrapper types. See also unboxing.

byte

A primitive Java data type that’s an 8-bit two’s-complement signed number.

callback

A behavior that is defined by one object and then later invoked by another object when a particular event occurs. The Java event mechanism is a kind of callback.

cast

The changing of the apparent type of a Java object from one type to another, specified type. Java casts are checked both statically by the Java compiler and at runtime.

catch

The Java catch statement introduces an exception-handling block of code following a try statement. The catch keyword is followed by one or more exception type and argument name pairs in parentheses and a block of code within curly braces.

certificate

An electronic document using a digital signature to assert the identity of a person, group, or organization. Certificates attest to the identity of a person or group and contain that organization’s public key. A certificate is signed by a certificate authority with its digital signature.

certificate authority (CA)

An organization that is entrusted to issue certificates, taking whatever steps are necessary to verify the real-world identity for which it is issuing the certificate.

char

A primitive Java data type; a variable of type char holds a single 16-bit Unicode character.

class

The fundamental unit that defines an object in most object-oriented programming languages. A class is an encapsulated collection of variables and methods that may have privileged access to one another. Usually a class can be instantiated to produce an object that’s an instance of the class, with its own unique set of data.

The class keyword is used to declare a class, thereby defining a new object type.

classloader

An instance of the class java.lang.ClassLoader, which is responsible for loading Java binary classes into the Java VM. Classloaders help partition classes based on their source for both structural and security purposes and can also be chained in a parent-child hierarchy.

class method

See static method.

classpath

The sequence of path locations specifying directories and archive files containing compiled Java class files and resources, which are searched in order to find components of a Java application.

class variable

See static variable.

client

The consumer of a resource or the party that initiates a conversation in the case of a networked client/server application. See also server.

Collections API

Classes in the core java.util package for working with and sorting structured collections or maps of items. This API includes the Vector and Hashtable classes as well as newer items such as List, Map, and Queue.

compilation unit

The unit of source code for a Java class. A compilation unit normally contains a single class definition and in most current development environments is simply a file with a .java extension.

compiler

A program that translates source code into executable code.

component architecture

A methodology for building parts of an application. It is a way to build reusable objects that can be easily assembled to form applications.

composition

Combining existing objects to create another, more complex object. When you compose a new object, you create complex behavior by delegating tasks to the internal objects. Composition is different from inheritance, which defines a new object by changing or refining the behavior of an old object. See also inheritance.

constructor

A special method that is invoked automatically when a new instance of a class is created. Constructors are used to initialize the variables of the newly created object. The constructor method has the same name as the class and no explicit return value.

content handler

A class that is called to parse a particular type of data and convert it to an appropriate object.

datagram

A packet of data normally sent using a connectionless protocol such as UDP, which provides no guarantees about delivery or error checking and provides no control information.

data hiding

See encapsulation.

deep copy

A duplicate of an object along with all of the objects that it references, transitively. A deep copy duplicates the entire “graph” of objects, instead of just duplicating references. See also shallow copy.

Document Object Model (DOM)

An in-memory representation of a fully parsed XML document using objects with names like Element, Attribute, and Text. The Java XML DOM API binding is standardized by the World Wide Web Consortium (W3C).

double

A Java primitive data type; a double value is a 64-bit (double-precision) floating-point number in IEEE-754 (binary64) binary format.

Document Type Definition (DTD)

A document containing specialized language that expresses constraints on the structure of XML tags and tag attributes. DTDs are used to validate an XML document, and can constrain the order and nesting of tags as well as the allowed values of attributes.

Enterprise JavaBeans (EJBs)

A server-side business component architecture named for, but not significantly related to, the JavaBeans component architecture. EJBs represent business services and database components, and provide declarative security and transactions.

encapsulation

The object-oriented programming technique of limiting the exposure of variables and methods to simplify the API of a class or package. Using the private and protected keywords, a programmer can limit the exposure of internal (“black box”) parts of a class. Encapsulation reduces bugs and promotes reusability and modularity of classes. This technique is also known as data hiding.

enum

The Java keyword for declaring an enumerated type. An enum holds a list of constant object identifiers that can be used as a type-safe alternative to numeric constants that serve as identifiers or labels.

enumeration

See enum.

erasure

The implementation technique used by Java generics in which generic type information is removed (erased) and distilled to raw Java types at compilation. Erasure provides backward compatibility with nongeneric Java code, but introduces some difficulties in the language.

event

A user’s action, such as a mouse-click or keypress.

The Java object delivered to a registered event listener in response to a user action or other activity in the system.

exception

A signal that some unexpected condition has occurred in the program. In Java, exceptions are objects that are subclasses of Exception or Error (which themselves are subclasses of Throwable). Exceptions in Java are “raised” with the throw keyword and handled with the catch keyword. See also catch, throw, and throws.

exception chaining

The design pattern of catching an exception and throwing a new, higher-level, or more appropriate exception that contains the underlying exception as its cause. The “cause” exception can be retrieved if necessary.

extends

A keyword used in a class declaration to specify the superclass of the class being defined. The class being defined has access to all the public and protected variables and methods of the superclass (or, if the class being defined is in the same package, it has access to all nonprivate variables and methods). If a class definition omits the extends clause, its superclass is taken to be java.lang.Object.

final

A keyword modifier that may be applied to classes, methods, and variables. It has a similar, but not identical, meaning in each case. When final is applied to a class, it means that the class may never be subclassed. java.lang.System is an example of a final class. A final method cannot be overridden in a subclass. When final is applied to a variable, the variable is a constant — that is, it can’t be modified. (The contents of a mutable object can still be changed; the final variable always points to the same object.)

finalize

A reserved method name. The finalize() method is called by the Java VM when an object is no longer being used (i.e., when there are no further references to it) but before the object’s memory is actually reclaimed by the system. Largely disfavored in light of newer approaches such as the Closeable interface and try-with-resources.

finally

A keyword that introduces the finally block of a try/catch/finally construct. catch and finally blocks provide exception handling and routine cleanup for code in a try block. The finally block is optional and appears after the try block, and after zero or more catch blocks. The code in a finally block is executed once, regardless of how the code in the try block executes. In normal execution, control reaches the end of the try block and proceeds to the finally block, which generally performs any necessary cleanup.

float

A Java primitive data type; a float value is a 32-bit (single-precision) floating-point number represented in IEEE 754 format.

garbage collection

The process of reclaiming the memory of objects no longer in use. An object is no longer in use when there are no references to it from other objects in the system and no references in any local variables on any thread’s method call stack.

generics

The syntax and implementation of parameterized types in the Java language, added in Java 5.0. Generic types are Java classes that are parameterized by the user on one or more additional Java types to specialize the behavior of the class. Generics are sometimes referred to as templates in other languages.

generic class

A class that uses the Java generics syntax and is parameterized by one or more type variables, which represent class types to be substituted by the user of the class. Generic classes are particularly useful for container objects and collections that can be specialized to operate on a specific type of element.

generic method

A method that uses the Java generics syntax and has one or more arguments or return types that refer to type variables representing the actual type of data element the method will use. The Java compiler can often infer the types of the type variables from the usage context of the method.

graphics context

A drawable surface represented by the java.awt.Graphics class. A graphics context contains contextual information about the drawing area and provides methods for performing drawing operations in it.

graphical user interface (GUI)

A traditional, visual user interface consisting of a window containing graphical items such as buttons, text fields, pull-down menus, dialog boxes, and other standard interface components.

hashcode

A random-looking identifying number, based on the data content of an object, used as a kind of signature for the object. A hashcode is used to store an object in a hash table (or hash map). See also hash table.

hash table

An object that is like a dictionary or an associative array. A hash table stores and retrieves elements using key values called hashcodes. See also hashcode.

hostname

The human-readable name given to an individual computer attached to the internet.

Hypertext Transfer Protocol (HTTP)

The protocol used by web browsers or other clients to talk to web servers. The simplest form of the protocol uses the commands GET to request a file and POST to send data.

Integrated Development Environment (IDE)

A GUI tool such as IntelliJ IDEA or Eclipse that provides source editing, compiling, running, debugging, and deployment functionality for developing Java applications.

implements

A keyword used in class declarations to indicate that the class implements the named interface or interfaces. The implements clause is optional in class declarations; if it appears, it must follow the extends clause (if any). If an implements clause appears in the declaration of a non-abstract class, every method from each specified interface must be implemented by the class or by one of its superclasses.

import

The import statement makes Java classes available to the current class under an abbreviated name or disambiguates classes imported in bulk by other import statements. (Java classes are always available by their fully qualified name, assuming the appropriate class file can be found relative to the CLASSPATH environment variable and that the class file is readable. import doesn’t make the class available; it just saves typing and makes your code more legible.) Any number of import statements may appear in a Java program. They must appear, however, after the optional package statement at the top of the file, and before the first class or interface definition in the file.

inheritance

An important feature of object-oriented programming that involves defining a new object by changing or refining the behavior of an existing object. Through inheritance, an object implicitly contains all of the non-private variables and methods of its superclass. Java supports single inheritance of classes and multiple inheritance of interfaces.

inner class

A class definition that is nested within another class or a method. An inner class functions within the lexical scope of another class.

instance

An occurrence of something, usually an object. When a class is instantiated to produce an object, we say the object is an instance of the class.

instance method

A non-static method of a class. Such a method is passed an implicit this reference to the object that invoked it. See also static, static method.

instanceof

A Java operator that returns true if the object on its left side is an instance of the class (or implements the interface) specified on its right side. instanceof returns false if the object isn’t an instance of the specified class or doesn’t implement the specified interface. It also returns false if the specified object is null.

instance variable

A non-static variable of a class. Each instance of a class has an independent copy of all of the instance variables of the class. See also class variable, static.

int

A primitive Java data type that’s a 32-bit two’s-complement signed number.

interface

A keyword used to declare an interface.

A collection of abstract methods that collectively define a type in the Java language. Classes implementing the methods may declare that they implement the interface type, and instances of them may be treated as that type.

internationalization

The process of making an application accessible to people who speak a variety of languages. Sometimes abbreviated I18N.

interpreter

The module that decodes and executes Java bytecode. Most Java bytecode is not, strictly speaking, interpreted any longer but compiled to native code dynamically by the Java VM.

introspection

The process by which a JavaBean provides additional information about itself, supplementing information learned by reflection.

ISO 8859-1

An 8-bit character encoding standardized by the ISO. This encoding is also known as Latin-1 and contains characters from the Latin alphabet suitable for English and most languages of western Europe.

JavaBeans

A component architecture for Java. It is a way to build interoperable Java objects that can be manipulated easily in a visual application builder environment.

Java beans

Java classes that are built following the JavaBeans design patterns and conventions.

JavaScript

A language developed early in the history of the web by Netscape for creating dynamic web pages. From a programmer’s point of view, it’s unrelated to Java, although some of its syntax is similar.

Java API for XML Binding (JAXB)

A Java API that allows for generation of Java classes from XML DTD or Schema descriptions and the generation of XML from Java classes.

Java API for XML Parsers (JAXP)

The Java API that allows for pluggable implementations of XML and XSL engines. This API provides an implementation-neutral way to construct parsers and transforms.

JAX-RPC

The Java API for XML Remote Procedure Calls, used by web services.

Java Database Connectivity (JDBC)

The standard Java API for talking to an SQL (Structured Query Language) database.

JDOM

A native Java XML DOM created by Jason Hunter and Brett McLaughlin. JDOM is easier to use than the standard DOM API for Java. It uses the Java Collections API and standard Java conventions. Available at the JDOM Project site.

Java Web Services Developer Pack (JDSDP)

A bundle of standard extension APIs packaged as a group with an installer from Sun. The JWSDP includes JAXB, JAX-RPC, and other XML and web services-related packages.

lambda (or lambda expression)

A compact way to put the entire definition of a small, anonymous function right where you are using it in the code.

Latin-1

A nickname for ISO 8859-1.

layout manager

An object that controls the arrangement of components within the display area of a Swing or AWT container.

lightweight component

A pure Java GUI component that has no native peer in the AWT.

local variable

A variable that is declared inside a method. A local variable can be seen only by code within that method.

Logging API

The Java API for structured logging and reporting of messages from within application components. The Logging API supports logging levels indicating the importance of messages, as well as filtering and output capabilities.

long

A primitive Java data type that’s a 64-bit two’s-complement signed number.

message digest

A cryptographically computed number based on the content of a message, used to determine whether the message’s contents have been changed in any way. A change to a message’s contents will change its message digest. When implemented properly, it is almost impossible to create two similar messages with the same digest.

method

The object-oriented programming term for a function or procedure.

method overloading

Provides definitions of more than one method with the same name but with different argument lists. When an overloaded method is called, the compiler determines which one is intended by examining the supplied argument types.

method overriding

Defines a method that matches the name and argument types of a method defined in a superclass. When an overridden method is invoked, the interpreter uses dynamic method lookup to determine which method definition is applicable to the current object. Beginning in Java 5.0, overridden methods can have different return types, with restrictions.

MIME (or MIME type)

A media type classification system often associated with email attachments or web page content.

Model-View-Controller (MVC) framework

A UI design that originated in Smalltalk. In MVC, the data for a display item is called the model. A view displays a particular representation of the model, and a controller provides user interaction with both. Java incorporates many MVC concepts.

modifier

A keyword placed before a class, variable, or method that alters the item’s accessibility, behavior, or semantics. See also abstract, final, native method, private, protected, public, static, synchronized.

NaN (not-a-number)

This is a special value of the double and float data types that represents an undefined result of a mathematical operation, such as zero divided by zero.

native method

A method that is implemented in a native language on a host platform, rather than being implemented in Java. Native methods provide access to such resources as the network, the windowing system, and the host filesystem.

new

A unary operator that creates a new object or array (or raises an OutOfMemoryException if there is not enough memory available).

NIO

The Java “new” I/O package. A core package introduced in Java 1.4 to support asynchronous, interruptible, and scalable I/O operations. The NIO API supports nonthreadbound “select” style I/O handling.

null

null is a special value that indicates that a reference-type variable doesn’t refer to any object instance. Static and instance variables of classes default to the value null if not otherwise assigned.

object

The fundamental structural unit of an object-oriented programming language, encapsulating a set of data and behavior that operates on that data.

An instance of a class, having the structure of the class but its own copy of data elements. See also instance.

” (LerJav)

Sources:

Fair Use Sources:

Categories
Bibliography Java Software Engineering

Learning Java: An Introduction to Real-World Programming with Java

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

Fair Use Source: B086L2NYWR (LerJav)

By Marc Loy, Patrick Niemeyer, and Daniel Leuck

Learning Java, Fifth Edition, by Marc Loy, Patrick Niemeyer, and Daniel Leuck, 2020, 978-1-492-05627-0, B086L2NYWR (LerJav)

“If you’re new to Java—or new to programming—this best-selling book will guide you through the language features and APIs of Java 11. 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.

You’ll learn powerful new ways to manage resources and exceptions in your applications—along with core language features included in recent Java versions.

  • Develop with Java, using the compiler, interpreter, and other tools
  • Explore Java’s built-in thread facilities and concurrency package
  • Learn text processing and the powerful regular expressions API
  • Write advanced networked or web-based applications and services

About the Author

Marc Loy started with Java training at Sun Microsystems in the early days (shout out to HotJava!) and never looked back. He authored a number of early Java books and training courses, working with a wide variety of companies across the US, Europe and Asia along the way. For O’Reilly, Marc has served as co-author on Java Swing and Learning GNU Emacs. Currently in Ohio, Marc is a software developer and trainer specializing in user experience design and mobile applications.

Patrick Niemeyer became involved with Oak (Java’s predecessor) while working at Southwestern Bell Technology Resources. He is an independent consultant and author in the areas of networking and distributed applications. Pat is the author of BeanShell, a popular Java scripting language, as well as various other free goodies on the Net. Most recently, Pat has been developing enterprise architecture for A.G. Edwards. He currently lives in the Central West End area of St. Louis with various creatures.

Dan Leuck is the CEO of Ikayzo, a Tokyo and Honolulu-based interactive design and software development firm with customers including Sony, Oracle, Nomura, PIMCO and the federal government. He previously served as Senior Vice President of Research and Development for Tokyo-based ValueCommerce, Asia’s largest online marketing company, Global Head of Development for London-based LastMinute.com, Europe’s largest B2C website, and President of the US division of DML. Daniel has extensive experience managing teams of 150+ developers in five countries. He has served on numerous advisory boards and panels for companies such as Macromedia and Sun Microsystems. Daniel is active in the Java community, is a contributor to BeanShell, the project lead for SDL, and sits on numerous Java Community Process expert groups.

Product details

  • Print length : 848 pages
  • Publication date : March 30, 2020
  • Publisher : O’Reilly Media; 5th edition (March 30, 2020)
  • ASIN : B086L2NYWR

Preface

“This book is about the Java programming language and environment. Whether you are a software developer or just someone who uses the internet in your daily life, you’ve undoubtedly heard about Java. Its introduction was one of the most exciting developments in the history of the web, and Java applications have powered much of the growth of business on the internet. Java is, arguably, the most popular programming language in the world, used by millions of developers on almost every kind of computer imaginable. Java has surpassed languages such as C++ and Visual Basic in terms of developer demand and has become the de facto language for certain kinds of development — especially for web-based services. Most universities are now using Java in their introductory courses alongside the other important modern languages. Perhaps you are using this text in one of your classes right now!

This book gives you a thorough grounding in Java fundamentals and APIs. Learning Java, Fifth Edition, attempts to live up to its name by mapping out the Java language and its class libraries, programming techniques, and idioms. We’ll dig deep into interesting areas and at least scratch the surface of other popular topics. Other titles from O’Reilly pick up where we leave off and provide more comprehensive information on specific areas and applications of Java.

Whenever possible, we provide compelling, realistic, and fun examples and avoid merely cataloging features. The examples are simple, but hint at what can be done. We won’t be developing the next great “killer app” in these pages, but we hope to give you a starting point for many hours of experimentation and inspired tinkering that will lead you to develop one yourself.

Web page for this book where they list errata and any additional information. You can access this page at https://oreil.ly/Java_5e.” (B086L2NYWR)

Who Should Read This Book

“This book is for computer professionals, students, technical people, and Finnish hackers. It’s for everyone who has a need for hands-on experience with the Java language with an eye toward building real applications. This book could also be considered a crash course in object-oriented programming, networking, and user interfaces. As you learn about Java, you’ll also learn a powerful and practical approach to software development, beginning with a deep understanding of the fundamentals of Java and its APIs.

Superficially, Java looks like C or C++, so you’ll have a tiny headstart in using this book if you have some experience with one of these languages. If you do not, don’t worry. Don’t make too much of the syntactic similarities between Java and C or C++. In many respects, Java acts like more dynamic languages such as Smalltalk and Lisp. Knowledge of another object-oriented programming language should certainly help, although you may have to change some ideas and unlearn a few habits. Java is considerably simpler than languages such as C++ and Smalltalk. If you learn well from concise examples and personal experimentation, we think you’ll like this book.

The last part of this book branches out to discuss Java in the context of web applications, web services, and request processing, so you should be familiar with the basic ideas behind web browsers, servers, and documents.” (B086L2NYWR)

New Developments

“This edition of Learning Java is actually the seventh edition — updated and retitled — of our original, popular Exploring Java. With each edition, we’ve taken great care not only to add new material covering additional features, but to thoroughly revise and update the existing content to synthesize the coverage and add years of real-world perspective and experience to these pages.

One noticeable change in recent editions is that we’ve de-emphasized the use of applets, reflecting their diminished role in recent years in creating interactive web pages. In contrast, we’ve greatly expanded our coverage of Java web applications and web services, which are now mature technologies.

We cover all of the important features of the latest “long-term support” release of Java, officially called Java Standard Edition (SE) 11, OpenJDK 11, but we also add in a few details from the “feature” releases of Java 12, Java 13, and Java 14. Sun Microsystems (Java’s keeper before Oracle) has changed the naming scheme many times over the years. Sun coined the term Java 2 to cover the major new features introduced in Java version 1.2 and dropped the term JDK in favor of SDK. With the sixth release, Sun skipped from Java version 1.4 to Java 5.0, but reprieved the term JDK and kept its numbering convention there. After that, we had Java 6, Java 7, and so on, and now we are at Java 14.

This release of Java reflects a mature language with occasional syntactic changes and updates to APIs and libraries. We’ve tried to capture these new features and update every example in this book to reflect not only the current Java practice, but style as well.” (B086L2NYWR)

New in This Edition (Java 11, 12, 13, 14)

“This edition of the book continues our tradition of rework to be as complete and up-to-date as possible. It incorporates changes from both the Java 11 — again, the long-term support version — and Java 12, 13, and 14 feature releases. (More on the specifics of the Java features included and excluded in recent releases in Chapter 13.) New topics in this edition include:

New language features, including type inference in generics and improved exception handling and automatic resource management syntax

New interactive playground, jshell, for trying out code snippets

The proposed switch expression

Basic lambda expressions

Updated examples and analysis throughout the book” (B086L2NYWR)

Using This Book

“This book is organized roughly as follows:

Chapters 1 and 2 provide a basic introduction to Java concepts and a tutorial to give you a jump-start on Java programming.

Chapter 3 discusses fundamental tools for developing with Java (the compiler, the interpreter, jshell, and the JAR file package).

Chapters 4 and 5 introduce programming fundamentals, then describe the Java language itself, beginning with the basic syntax and then covering classes and objects, exceptions, arrays, enumerations, annotations, and much more.

Chapter 6 covers exceptions, errors, and the logging facilities native to Java.

Chapter 7 covers collections alongside generics and parameterized types in Java.

Chapter 8 covers text processing, formatting, scanning, string utilities, and much of the core API utilities.

Chapter 9 covers the language’s built-in thread facilities.

Chapter 10 covers the basics of graphical user interface (GUI) development with Swing.

Chapter 11 covers Java I/O, streams, files, sockets, networking, and the NIO package.

Chapter 12 covers web applications using servlets, servlet filters, and WAR files, as well as web services.

Chapter 13 introduces the Java Community Process and highlights how to track future changes to Java while helping you retrofit existing code with new features, such as the lambda expressions introduced in Java 8.

If you’re like us, you don’t read books from front to back. If you’re really like us, you usually don’t read the preface at all. However, on the off chance that you will see this in time, here are a few suggestions:

If you are already a programmer and just need to learn Java in the next five minutes, you are probably looking for the examples. You might want to start by glancing at the tutorial in Chapter 2. If that doesn’t float your boat, you should at least look at the information in Chapter 3, which explains how to use the compiler and interpreter. This should get you started.

Chapters 11 and 12 are the places to head if you are interested in writing network or web-based applications and services. Networking remains one of the more interesting and important parts of Java.

Chapter 10 discusses Java’s graphics features and component architecture. You should read this if you are interested in writing desktop graphical Java applications.

Chapter 13 discusses how to stay on top of changes to the Java language itself, regardless of your particular focus.” (B086L2NYWR)

Online Resources

“There are many online sources for information about Java.

Oracle’s official website for Java topics is https://oreil.ly/Lo8QZ; look here for the software, updates, and Java releases. This is where you’ll find the reference implementation of the JDK, which includes the compiler, the interpreter, and other tools.

Oracle also maintains the OpenJDK site. This is the primary open source version of Java and the associated tools. We’ll be using the OpenJDK for all the examples in this book.

You should also visit O’Reilly’s site at http://oreilly.com/. There you’ll find information about other O’Reilly books for both Java and a growing array of other topics. You should also check out the online learning and conference options — O’Reilly is a real champion for education in all its forms.

And of course, you can check the home page for Learning Java!” (B086L2NYWR)

Conventions Used in This Book

“The font conventions used in this book are quite simple.

Italic is used for:

Pathnames, filenames, and program names

Internet addresses, such as domain names and URLs

New terms where they are defined

Program names, compilers, interpreters, utilities, and commands

Threads

Constant width is used for:

Anything that might appear in a Java program, including method names, variable names, and class names

Tags that might appear in an HTML or XML document

Keywords, objects, and environment variables

Constant width bold is used for:

Text that is typed by the user on the command line or in a dialog

Constant width italic is used for:

Replaceable items in code

In the main body of text, we always use a pair of empty parentheses after a method name to distinguish methods from variables and other creatures.

In the Java source listings, we follow the coding conventions most frequently used in the Java community. Class names begin with capital letters; variable and method names begin with lowercase. All the letters in the names of constants are capitalized. We don’t use underscores to separate words in a long name; following common practice, we capitalize individual words (after the first) and run the words together. For example: thisIsAVariable, thisIsAMethod(), ThisIsAClass, and THIS_IS_A_CONSTANT. Also, note that we differentiate between static and nonstatic methods when we refer to them. Unlike some books, we never write Foo.bar() to mean the bar() method of Foo unless bar() is a static method (paralleling the Java syntax in that case).” (B086L2NYWR)

Table of Contents:

(B086L2NYWR)

Preface Who Should Read This Book

New Developments New in This Edition (Java 11, 12, 13, 14)

Using This Book

Online Resources

Conventions Used in This Book

Using Code Examples

O’Reilly Online Learning

How to Contact Us

Acknowledgments

  1. A Modern Language Enter Java Java’s Origins

Growing Up

A Virtual Machine

Java Compared with Other Languages

Safety of Design Simplify, Simplify, Simplify…

Type Safety and Method Binding

Incremental Development

Dynamic Memory Management

Error Handling

Threads

Scalability

Safety of Implementation The Verifier

Class Loaders

Security Managers

Application and User-Level Security

A Java Road Map The Past: Java 1.0–Java 11

The Present: Java 14

The Future

Availability

  1. A First Application Java Tools and Environment Installing the JDK

Installing OpenJDK on Linux

Installing OpenJDK on macOS

Installing OpenJDK on Windows

Configuring IntelliJ IDEA and Creating a Project

Running the Project

Grabbing the Learning Java Examples

HelloJava Classes

The main() Method

Classes and Objects

Variables and Class Types

HelloComponent

Inheritance

The JComponent Class

Relationships and Finger-Pointing

Package and Imports

The paintComponent() Method

HelloJava2: The Sequel Instance Variables

Constructors

Events

The repaint() Method

Interfaces

Goodbye and Hello Again

  1. Tools of the Trade JDK Environment

The Java VM

Running Java Applications System Properties

The Classpath javap

Modules

The Java Compiler

Trying Java

JAR Files and Java JAR File Compression

The jar Utility

The pack200 Utility

Building Up

  1. The Java Language Text Encoding

Comments Javadoc Comments

Variables and Constants

Types Primitive Types

Reference Types

Inferring Types

Passing References

A Word About Strings

Statements and Expressions Statements

Expressions

Arrays Array Types

Array Creation and Initialization

Using Arrays

Anonymous Arrays

Multidimensional Arrays

Types and Classes and Arrays, Oh My!

  1. Objects in Java Classes Declaring and Instantiating Classes

Accessing Fields and Methods

Static Members

Methods Local Variables

Shadowing

Static Methods

Initializing Local Variables

Argument Passing and References

Wrappers for Primitive Types

Method Overloading

Object Creation Constructors

Working with Overloaded Constructors

Object Destruction Garbage Collection

Packages Importing Classes

Custom Packages

Member Visibility and Access

Compiling with Packages

Advanced Class Design Subclassing and Inheritance

Interfaces

Inner Classes

Anonymous Inner Classes

Organizing Content and Planning for Failure

  1. Error Handling and Logging Exceptions Exceptions and Error Classes

Exception Handling

Bubbling Up

Stack Traces

Checked and Unchecked Exceptions

Throwing Exceptions

try Creep

The finally Clause

try with Resources

Performance Issues

Assertions Enabling and Disabling Assertions

Using Assertions

The Logging API Overview

Logging Levels

A Simple Example

Logging Setup Properties

The Logger

Performance

Real-World Exceptions

  1. Collections and Generics Collections The Collection Interface

Collection Types

The Map Interface

Type Limitations Containers: Building a Better Mousetrap

Can Containers Be Fixed?

Enter Generics Talking About Types

“There Is No Spoon” Erasure

Raw Types

Parameterized Type Relationships Why Isn’t a List a List

Colophon

The animals on the cover of Learning Java, Fifth Edition are a Bengal tiger and her cubs. (B086L2NYWR)

Sources:

Fair Use Sources:

Categories
Java Software Engineering

! Template Java

See also Java Programming Language, Java Glossary, Java Bibliography, Java Reference materials

” (WP)

” (WP)

Sources:

Fair Use Sources: