Mastering Java 11
Second Edition
Develop modular and secure Java applications using concurrency and advanced JDK libraries
Dr. Edward Lavieri
BIRMINGHAM - MUMBAI
Mastering Java 11Second Edition
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Aaron Lazar
Acquisition Editor: Denim Pinto
Content Development Editor: Akshada Iyer
Technical Editor: Gaurav Gala
Copy Editor: Safis Editing
Project Coordinator: Prajakta Naik
Proofreader: Safis Editing
Indexer: Rekha Nair
Graphics: Jisha Chirayil
Production Coordinator: Nilesh Mohite
First published: October 2017
Second edition: September 2018
Production reference: 1260918
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78913-761-3
www.packtpub.com
To IBB, my love, partner, and best friend.
Ed Lavieri
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Dr. Edward Lavieri is a veteran developer with a strong academic background. He has earned a doctorate in computer science from Colorado Technical University, an MS in management information systems (Bowie State University), an MS in education (Capella University), and an MS in operations management (University of Arkansas).
He has been creating and teaching computer science courses since 2002. Edward retired from the US Navy as a Command Master Chief after 25 years of active service. As the founder and creative director of three19, a software design and development studio. Edward is constantly designing and developing software.
This is Edward's 10th book.
About the reviewer
Mandar Jog is an expert IT trainer with over 15 years of training experience. He is an expert with technologies such as Java, Spring, Hibernate, and Android. He also possesses SCJP and SCWCD certifications. He is an occasional blogger; he makes the readers to feel I can with complex concepts in Java and J2EE. He is a regular speaker at many engineering colleges in technical seminars and workshops. He worked as a technical reviewer on Modular Programming in Java 9 and Mastering Java 9 by Packt Publishing.
Thank you Tejaswini (my wife) for your constant and inspirational support. I am equally grateful to my son, Ojas; his lovely smiles always make me push myself further.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
Java 11 and its new features add to the richness of the languageone of the most commonly-used programming languages for building robust software applications. Java 11 expands the capabilities of the Java platform. This book is your one-stop guide to mastering the changes made to the Java platform since Java 9.
This book gives an overview and explanation of the new features introduced in Java 11 and their importance. You will be provided with practical guidance in applying your newly acquired knowledge of Java 11 as well as information on future developments to the the Java platform. This book aims to improve your productivity by making your applications faster. By learning the best practices in Java, you will become the go-to person in your organization for Java.
By the end of this book, you will not only learn the important concepts of Java 11 but you will also gain a nuanced understanding of the important aspects of programming with this great language.
Who this book is for
This book is for enterprise developers and existing Java developers. Basic knowledge of Java is necessary.
What this book covers
, The Java 11 Landscape , explores the newly implemented time-based versioning system for the Java platform. We survey the current Java landscape with a specific focus on changes introduced with Java 9, 10 (18.3), and 11 (18.9). Our exploration includes an overview of Java 9's modularity, Java Shell, external process control, garbage collection, JHM, and more. For Java 10, we will highlight key changes to include local variable type inference, JDK consolidation, garbage collection, application class-data sharing, and root certificates, to name a few. Finally, we will explore changes introduced in Java 11, including dynamic class-file constants, garbage collection, and local variable type inference for lambdas.
, Discovering Java 11 , looks at several internal changes introduced in the Java platform, including changes from Java 9, 10, and 11. Java 9 represented a major release to the Java platform; Java 10 and 11 were timed releases. Collectively, these releases consisted of a large number of internal changes, representing a tremendous set of new possibilities for Java developers, some stemming from developer requests, others from Oracle-inspired enhancements.
Next page