JAVA 9.0 To 13.0 New Features
eBook - ePub

JAVA 9.0 To 13.0 New Features

Learn, Implement and Migrate to New Version of Java

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

JAVA 9.0 To 13.0 New Features

Learn, Implement and Migrate to New Version of Java

About this book

A comprehensive guide to study the version updates from JDK9.0 to JDK13.0 Key Features

  • Learn the journey of Java from its initial days till date.
  • Learn how to implement modular programming in Java9.
  • Study the updates in different versions of Java from version 9.0 to 13.0.
  • Understand the need and working of reactive programming.
  • Learn to migrate the pre-existing Java code to new versions.
  • Learn how to use jshell to test a new API before using in a project.


Description
Version release is one of the important phases of success of any programming language. Over the years, Java had made many improvements in its API to make to reliable and flexible to use. This book aims at providing you information related to all the updates from JDK9.0 to JDK13.0 in one place.This book starts with a brief history of Java. It covers how Java has evolved as a complete programming language over the years by launching different versions. You will learn the concept of module system and other important concepts introduced in JSE9.0 and JSE10.0. Moving ahead, the book will take you through updates in JDK11.0. Concepts like Epsilon, ZGC, and Nest-Based access control have also been discussed.Though the version updates are good to learn, they create complexities in updating the existing code to make it compatible with the new version. This book talks in detail about how you can migrate your legacy code to match up with the new versions. It also covers how to use jshell, a tool used to test your code snippet without writing the complete application class, with numerous examples. Further, this book covers in detail the concept of reactive programming. Concepts like publisher, subscriber, subscription and back-pressure have been discussed with examples.At the end of the book, you will learn about the very recent updates which have been released by Java. The chapters talk about JDK12.0 and JDK13.0. They cover concepts like Shenondaoh, microbenchmark suit, modified switch expression from JDK12.0. Though, Java13 is still a hot-plated dish, this book gives you a fair idea about what are the new updates which have been proposed in this version. What You Will Learn
By the end of this book, you will be able to implement the updates provided in different versions of Java. This book has covered the updates from version 9.0 to 13.0. You will be able to work with the Java Module System. You will be able to test the new API using jshell. Along with this, you will be able to migrate your legacy code to match the recommendations of new versions of Java. Who This Book is For
This book covers the new version updates in Java. So, prior knowledge of Java is recommended before reading this book. Though we are covering the versions from JSE9.0 onwards, it is not necessary that the reader should be expert in the earlier versions. If you are keen to know the recent developments in Java API, this is the perfect book for you. Table of Contents
1. Insights of Versioning
2. What's new in Java9
3. Understanding JDK10 – Step towards JDK11
4. Dive in JDK11
5. Migrating the code
6. Working with JShell
7. Reactive Programming and Concurrency Updates
8. What next in Java12
9. Introduction to Java13 About the Author
Mandar Jog is a passionate Java Trainer with over 15 years of experience in retail and corporate training. He has global certifications like SCJP and SCWCD. His areas of expertise are Java, J2EE (Spring, Hibernate). He has delivered more than 500 training sessions on Core Java, Web Technologies, Hibernate, Spring Boot, Angular, etc. LinkedIn Profile: https://www.linkedin.com/in/mandar-jog-0ba9a01b/

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • 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.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access JAVA 9.0 To 13.0 New Features by Jog,Mandar Jog in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Java. We have over one million books available in our catalogue for you to explore.

CHAPTER 1

Insight of Versioning

Introduction

Building an application is always a challenging task. It involves working with application programming interface (API), writing business logic and developing user interface (UI). Over the years, the developers have been using several programming languages and frameworks to build various types of applications. Besides, every programming language or framework is constantly working on how it can provide better services to the developers so that they can create efficient, scalable and asynchronous applications. With traditional programming languages, such as C, C++, developers have created a plethora of applications. However, Java certainly seems to be a better programming language than its counterparts. This is particularly because of its write once, run anywhere (WORA) characteristic and other features such as, platform independence, portability, and security. Java is arguably the most widely-used programming language to develop robust, distributed and secure applications in recent days .
The journey of Java started with the Project Green commissioned by Sun Microsystems. And, since then, it is continuously upgrading itself in terms of new API updates periodically for the current market scenario.

Structure

  • Different versions of Java
  • New versioning: time-based release versioning

Objective

After studying this chapter, you should be able to understand the concept of versioning, different versions of Java and time-based release versioning process of the Java language.

Project Green: the beginning

In the 1990s, Sun Microsystem initiated a project to create a programming tool using C and C++. Patrick Naughton, the head of the project was joined by James Gosling and Mike Sheridan. In its initial days, the primary aim of this team was not to develop a new programming language but to program new electronic devices other than computers. The project was being designed for developing embedded systems, where languages like C++ were not responsive enough.
This made Bill Joy, co-founder of Sun Microsystem to think of a new language for this project. Working on this idea Gosling started working on enhancing C++ and launched a complete programming language. Initially named as Oak after the tree that was outside this office, it was later renamed as Java.
Developers found Java revolutionary, but that was not the end of everything. In fact, it was just the beginning. What followed next was continuous update in the API. Such updates were released as a part of different version of Java. Though most of the other languages took small incremental step for upgrading, java started to kick off the versions with a wider scope and vision.
Over the years, Java’s API has undergone many structural changes. The package-oriented programming approach is reshaped to modular programming from JDK 1.9. This approach changed the way of traditional application development thoroughly.
The original name given to Java was not Oak, it was C++ ++--, which says new features added and unwanted features were removed.

Versions of Java

It is very interesting to observe how Java is transforming from one version to another; what are the different features in a particular version; and how it is helping the developers in creating better applications.
Let us quickly walk through the different versions of Java, from its early release to JDK8.0, in this chapter. We will be extensively discussing versions 9.0, 10.0, and 11.0 in later chapters.
Version: JDK1.0
Release date: 23rd January, 1996
This is a curtain-raiser. Sun Microsystem, launched their first version of Java 1.0 with basic facilities. The codename given to this version was Oak. This included Java runtime, development tools i.e. compilers. Following were the basic features of this release:
  • java.lang
  • java.io
  • java.util
  • java.net
Version: JDK1.1
Release date: 19th February, 1997
The prime focus of this release was to increase the stability, speed, and security of Java applications. This version contains around 700 classes with enhancements for performance, JDBC, and Java Bean support. Java had released a few updates of this version, which is also termed as minor versions of 1.1. The codenames of these versions are different for different API update like, Version1.1.6 (Abigail), Version 1.1.7(Brutus), Version 1.1.8(Chelsea). Following are the major changes that were implemented in this version:
  • Java archive (JAR) file format
  • Inner classes
  • Internationalization
  • Math package
  • Object serialization
  • Remote method invocation
Version: JDK1.2
Release date: 8thDecember, 1998
This version was launched in an era when the internet was booming. So, the term J2SE (Java 2 Platform, Standard Edition) was introduced to differentiate this development kit from J2EE (Enterprise Edition) and J2ME (Mobile Edition). One of the major updates in Java was that the classes reached up to 1520 bundles in 59 packages. The code name given to this version was Playground.
To improve the performance of the application, JDK1.2 introduced a few implementations:
  • Faster memory allocation and garbage collection:
    Memory allocation in heap was a concern, which was read by using thread-local cache. So, every time there was no need for locking the majority of the heap allocation. Also, constant strings were shared among different classes, reducing the unnecessary duplicate string object creation.
  • Native libraries:
    As JVM is not platform dependent, many a times the native libraries were not uniform. In this version, such libraries which supported core java classes were re-written using Java Native Interface (JNI).
  • Solaris native thread support:
    Java had given the ability to the kernel so that it could schedule native threads over parallel processors. This made concurrency cheaper.
The following major language changes/updates were implemented in this version:
  • Collection framework:
    A collection is a group of objects embedded in a single unit. Before JDK 1.2, developers were using arrays, vectors, or hash tables. Though these objects were giving the services, there were no common interfaces or methods shared between them, because of which developers were required to use different methods for accessing different collections.
    To overcome this complexity, Java came up with common interface structure in the format of collection framework API. This API consists of different interfaces like set, list or map. The classes implementing these interfaces provided a common set of methods, because of which developers could use the services more effectively.
  • strictfp keyword:
    Working with floating point data type had always been vulnerable, prior to JDK1.2. Floating point data was platform dependent, because of which the precision of the floating-point data was not guaranteed. The keyword strictfp resolved this issue which follows the IEEE 754 standards.
Following were the library changes/updates that were implemented in this version:
  • Just in Time (JIT) compiler implementation
  • Java plug-in
  • Swing graphical API
Version: J2SE1.3
Release date: 8th May, 2000
This version mainly focuses on the modifications in deployment and improvements of applet performance through Java Hotspot Client. The codename given to this version was Kestrel. Following were the major updates in this version:
  • Jar indexing:
    When the application is spread out in multiple JAR files, at runtime it becomes difficult for the application to find the required classes. Thi...

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. Acknowledgement
  7. Preface
  8. Errata
  9. Table of Contents
  10. 1. Insight of Versioning
  11. 2. What’s New in Java 9
  12. 3. Understanding JDK 10 - Step towards JDK 11
  13. 4. Dive in JDK 11
  14. 5. Migrating the Code
  15. 6. Working with JShell
  16. 7. Reactive Programming and Concurrency Updates
  17. 8. What’s New in Java12
  18. 9. Introduction to Java 13
  19. Index