Java 9 Programming By Example

Get the steps you need to discover the world of Java 9 programming using real-world examples
Preview in Mapt

Java 9 Programming By Example

Peter Verhas

4 customer reviews
Get the steps you need to discover the world of Java 9 programming using real-world examples
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Java 9 Programming By Example Book Cover
Java 9 Programming By Example
$ 35.99
$ 25.20
Java 9 Concurrency Cookbook - Second Edition Book Cover
Java 9 Concurrency Cookbook - Second Edition
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $40.98
Add to Cart

Book Details

ISBN 139781786468284
Paperback504 pages

Book Description

This book gets you started with essential software development easily and quickly, guiding you through Java’s different facets. By adopting this approach, you can bridge the gap between learning and doing immediately. You will learn the new features of Java 9 quickly and experience a simple and powerful approach to software development. You will be able to use the Java runtime tools, understand the Java environment, and create Java programs.

We then cover more simple examples to build your foundation before diving to some complex data structure problems that will solidify your Java 9 skills. With a special focus on modularity and HTTP 2.0, this book will guide you to get employed as a top notch Java developer.

By the end of the book, you will have a firm foundation to continue your journey towards becoming a professional Java developer.

Table of Contents

Chapter 1: Getting Started with Java 9
Getting started with Java
Installing Java
Executing jshell
Packaging classes into a JAR file
Managing the running Java application
Using an IDE
Summary
Chapter 2: The First Real Java Program - Sorting Names
Getting started with sorting
Getting started with project structure and build tools
Setting up the project with Maven
Coding the sort
Understanding the algorithm and language constructs
Compiling and running the program
Summary
Chapter 3: Optimizing the Sort - Making Code Professional
The general sorting program
A brief overview of various sorting algorithms
Project structure and build tools
Code the sort
Creating unit tests
Collections with wrong elements
Handling exceptions
Generics
Test Driven Development
Implementing QuickSort
Creating modules
Summary
Chapter 4: Mastermind - Creating a Game
The Game
The model of the game
Java collections
Dependency injection
Implementing the game
The Game class
Creating an integration test
Summary
Chapter 5: Extending the Game - Run Parallel, Run Faster
How to make Mastermind parallel
Refactoring
Processes
Threads
Fibers
java.lang.Thread
Pitfalls
ExecutorService
Variable access
The CPU heartbeat
Volatile variables
Synchronized block
Wait and notify
Lock
Atomic classes
BlockingQueue
IntervalGuesser
ParallelGamePlayer
Microbenchmarking
Summary
Chapter 6: Making Our Game Professional - Do it as a Webapp
Web and network
The HTTP protocol
HTTP/2.0
Cookies
Client server and web architecture
Writing servlets
Java Server Pages
HTML, CSS, and JavaScript
Mastermind servlet
Running the Jetty web servlet
Logging
Other technologies
Summary
Chapter 7: Building a Commercial Web Application Using REST
The MyBusiness web shop
Sample business architecture
Microservices
Service interface design
JSON
REST
Model View Controller
Spring framework
Service classes
Compiling and running the application
Testing the application
Servlet filters
Audit logging and AOP
Dynamic proxy-based AOP
Summary
Chapter 8: Extending Our E-Commerce Application
The MyBusiness ordering
Setting up the project
Order controller and DTOs
Consistency checker
Annotations
Using reflection
Functional programming in Java
Scripting in Java 9
Summary
Chapter 9: Building an Accounting Application Using Reactive Programming
Reactive... what?
Reactive programming in a nutshell
Reactive systems
Reactive streams
Reactive programming in Java
Summary
Chapter 10: Finalizing Java Knowledge to a Professional Level
Java deep technologies
Programming in the enterprise
Summary

What You Will Learn

  • Compile, package and run a trivial program using a build management tool
  • Get to know the principles of test-driven development and dependency management
  • Separate the wiring of multiple modules from the application logic into an application using dependency injection
  • Benchmark Java execution using Java 9 microbenchmarking
  • See the workings of the Spring framework and use Java annotations for the configuration
  • Master the scripting API built into the Java language and use the built-in JavaScript interpreter
  • Understand static versus dynamic implementation of code and high-order reactive programming in Java

Authors

Table of Contents

Chapter 1: Getting Started with Java 9
Getting started with Java
Installing Java
Executing jshell
Packaging classes into a JAR file
Managing the running Java application
Using an IDE
Summary
Chapter 2: The First Real Java Program - Sorting Names
Getting started with sorting
Getting started with project structure and build tools
Setting up the project with Maven
Coding the sort
Understanding the algorithm and language constructs
Compiling and running the program
Summary
Chapter 3: Optimizing the Sort - Making Code Professional
The general sorting program
A brief overview of various sorting algorithms
Project structure and build tools
Code the sort
Creating unit tests
Collections with wrong elements
Handling exceptions
Generics
Test Driven Development
Implementing QuickSort
Creating modules
Summary
Chapter 4: Mastermind - Creating a Game
The Game
The model of the game
Java collections
Dependency injection
Implementing the game
The Game class
Creating an integration test
Summary
Chapter 5: Extending the Game - Run Parallel, Run Faster
How to make Mastermind parallel
Refactoring
Processes
Threads
Fibers
java.lang.Thread
Pitfalls
ExecutorService
Variable access
The CPU heartbeat
Volatile variables
Synchronized block
Wait and notify
Lock
Atomic classes
BlockingQueue
IntervalGuesser
ParallelGamePlayer
Microbenchmarking
Summary
Chapter 6: Making Our Game Professional - Do it as a Webapp
Web and network
The HTTP protocol
HTTP/2.0
Cookies
Client server and web architecture
Writing servlets
Java Server Pages
HTML, CSS, and JavaScript
Mastermind servlet
Running the Jetty web servlet
Logging
Other technologies
Summary
Chapter 7: Building a Commercial Web Application Using REST
The MyBusiness web shop
Sample business architecture
Microservices
Service interface design
JSON
REST
Model View Controller
Spring framework
Service classes
Compiling and running the application
Testing the application
Servlet filters
Audit logging and AOP
Dynamic proxy-based AOP
Summary
Chapter 8: Extending Our E-Commerce Application
The MyBusiness ordering
Setting up the project
Order controller and DTOs
Consistency checker
Annotations
Using reflection
Functional programming in Java
Scripting in Java 9
Summary
Chapter 9: Building an Accounting Application Using Reactive Programming
Reactive... what?
Reactive programming in a nutshell
Reactive systems
Reactive streams
Reactive programming in Java
Summary
Chapter 10: Finalizing Java Knowledge to a Professional Level
Java deep technologies
Programming in the enterprise
Summary

Book Details

ISBN 139781786468284
Paperback504 pages
Read More
From 4 reviews

Read More Reviews

Recommended for You

Java 9 Concurrency Cookbook - Second Edition Book Cover
Java 9 Concurrency Cookbook - Second Edition
$ 39.99
$ 28.00
Java 9 with JShell Book Cover
Java 9 with JShell
$ 39.99
$ 28.00
Distributed Computing in Java 9 Book Cover
Distributed Computing in Java 9
$ 35.99
$ 25.20
Java 9 Regular Expressions Book Cover
Java 9 Regular Expressions
$ 27.99
$ 19.60
Mastering Java 9 Book Cover
Mastering Java 9
$ 35.99
$ 25.20
Learning Spring 5.0 Book Cover
Learning Spring 5.0
$ 39.99
$ 28.00