Book 5

Programming Techniques

Contents at a Glance

  1. Chapter 1: Programming Threads
    1. Understanding Threads
    2. Creating a Thread
    3. Implementing the Runnable Interface
    4. Creating Threads That Work Together
    5. Using an Executor
    6. Synchronizing Methods
    7. Creating a Lock
    8. Coping with Threadus Interruptus
  2. Chapter 2: Using Regular Expressions
    1. Creating a Program for Experimenting with Regular Expressions
    2. Performing Basic Character Matching
    3. Using Regular Expressions in Java Programs
  3. Chapter 3: Using Recursion
    1. Calculating the Classic Factorial Example
    2. Displaying Directories
    3. Writing Your Own Sorting Routine
  4. Chapter 4: Working with Dates and Times
    1. Pondering How Time is Represented
    2. Picking the Right Date and Time Class for Your Application
    3. Using the now Method to Create a Date-Time Object
    4. Using the parse Method to Create a Date-Time Object
    5. Using the of Method to Create a Date-Time Object
    6. Looking Closer at the LocalDate Class
    7. Extracting Information About a Date
    8. Comparing Dates
    9. Calculating with Dates
    10. Formatting Dates
    11. Looking at a Fun Birthday Calculator
  5. Chapter 5: IoT Programming with Raspberry Pi
    1. Introducing the Raspberry Pi
    2. Setting Up a Raspberry Pi
    3. Installing Java on a Raspberry Pi
    4. Installing the Pi4J Library
    5. Configuring the Geany Integrated Development Environment for Java Development
    6. Examining GPIO Ports
    7. Connecting an LED to a GPIO Port
    8. Building a Raspberry Pi LED Circuit
    9. Examining the Pi4J Library
    10. Importing GPIO Types
    11. Instantiating a GpioController
    12. Provisioning GPIO Pins
    13. Controlling the Pin State
    14. The Morse Code Program
    15. The Cylon Eyes Program
    16. Working with Input Pins
    17. Running the Button Switcher Program
    18. Finding a Better Way to Handle Input Events