
- 504 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Java 9 Programming By Example
About this book
Get the steps you need to discover the world of Java 9 programming using real-world examplesAbout This Book• We bridge the gap between "learning" and "doing" by providing real-world examples that will improve your software development• Our example-based approach will get you started quickly with software programming, get you up-to-speed with Java 9, and improve your Java skills• This book will show you the best practices of Java coding and improve your productivityWho This Book Is ForThis book is for anyone who wants to learn the Java programming language. You are expected to have some prior programming experience with another language, such as JavaScript or Python, but no knowledge of earlier versions of Java is assumed.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 JavaIn DetailThis 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.Style and approachThroughout this book, our aim is to build Java programs. We will be building multiple applications ranging from simpler ones to more complex ones. Learning by doing has its advantages as you will immediately see the concepts explained in action.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Optimizing the Sort - Making Code Professional
- Object-oriented programming principles
- Unit testing practices
- Algorithmic complexity and quick sort
- Exception handling
- Recursive methods
- Module support
The general sorting program
public class SimplestStringListSortTest {
@Test
public void canSortStrings() {
ArrayList actualNames = new ArrayList(Arrays.asList(
"Johnson", "Wilson",
"Wilkinson", "Abraham", "Dagobert"
));
Collections.sort(actualNames);
Assert.assertEquals(new ArrayList<String>(Arrays.<String>asList(
"Abraham", "Dagobert", "Johnson", "Wilkinson", "Wilson")), actualNames);
}
} $ mvn -Dtest=SimplestStringListSortTest test
Sometimes, you may need the documentation of older versions. You can use 3, 4, 5, 6, or 7 instead of 8 in the URL. Documentation for 3 and 4 is not available to read online, but it can be downloaded. Hopefully, you will never need that anymore. Version 5, perhaps. Version 6 is still widely used at large corporations.
A brief overview of various sorting algorithms
Table of contents
- Title Page
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Preface
- Getting Started with Java 9
- The First Real Java Program - Sorting Names
- Optimizing the Sort - Making Code Professional
- Mastermind - Creating a Game
- Extending the Game - Run Parallel, Run Faster
- Making Our Game Professional - Do it as a Webapp
- Building a Commercial Web Application Using REST
- Extending Our E-Commerce Application
- Building an Accounting Application Using Reactive Programming
- Finalizing Java Knowledge to a Professional Level
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app