SlideShare a Scribd company logo
6
Most read
7
Most read
14
Most read
Presented By :
Deepak Mehra(Sr.Software Consultant- L2) &
Sanjana Aggarwal(Software Consultant)
Introduction to
Java 11
Agenda
01
● Java 11
● How to download Java 11 free version
● Important changes and information.
● Java 11 Features and Enhancements
● Removed Features
● Deprecated Features
● Migration to Java 11
● Demo
Java 11
01
● Java 11 is the second LTS release after Java 8.
● Java 11 onwards, Oracle JDK would no longer be free for commercial
use.
● You can use it in developing stages but to use it commercially, you
need to buy a license. If you don’t, you can get an invoice bill from
Oracle any day!
Java 11 free version
01
Below is the link to download Java 11’s free version which can be used for
developments and educational purpose.
https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
Java 11 onwards, they have two different JDK builds:
● Oracle JDK (commercial)
● Oracle OpenJDK (open source)
Changes and information
01
● The deployment stack required for running applets and web
applications has been removed from JDK which was deprecated
in JDK 9.
● Java language translation for French, German, Italian, Korean,
Portuguese (Brazilian), Spanish, and Swedish is no longer
provided.
● Updated packaging format for Windows has changed from tar.gz
to .zip
Java 11 Features
01
● Running Java File with single command
● Local-Variable Syntax for Lambda Parameters
● New File Methods
● JEP 321: HTTP Client
● New utility methods in String class
● Nested Based Access Control
● TimeUnit Conversion
● Optional.isEmpty()
● Pattern recognizing methods
Running file with single command
01
● You do not have to compile the program to run it, you can simply
go ahead and run the program without a hiccup.
● How does it happen?
It compiles implicitly. This feature comes under JEP 330.
Lambda Params
01
JDK 11 allows ‘var’ to be used in lambda expressions.
var list = new ArrayList<String>();
01
Limitations of this feature:-
You either define the type var on all the parameter or none
(var a, var b) -> a+b // would do
(var a, b) -> a + b // would not do
(var a, String name) -> a + name // mixing not allowed
Var a -> a // you have to use the parentheses
File Methods
01
Three methods introduced in the file handling:-
● writeString()
● readString()
● isSameFile()
JEP 321: HTTP Client
It can be used to request HTTP resources over the network.
This new API is a kind of built around three main classes
● HttpClient
● HttpRequest
● HttpResponse
Utility functions in String class
01
As part of Java 11, 4 new string functions were introduced:-
● isBlank()
● lines()
● strip(), stripLeading(), stripTrailing()
● repeat(int value)
Nested Based Access Control
Basically, the nest term defines a new access control context that
allows classes that are logically part of the same code entity, but
which are compiled with distinct class files, to access each other's
private members without the need for compilers to insert
accessibility-broadening bridge methods.
TimeUnit Conversion
01
This method convert is used to convert the given time to a unit like
DAY, HOURS, MINUTES and for time too.
jshell>TimeUnit c = TimeUnit.DAYS;
Output: DAYS
jshell>c.convert(Duration.ofHours(24));
Output: 1
Optional.isEmpty()
01
This method returns false if the value of any optional object is empty
and else returns true.
jshell> Optional<String> name = Optional.of("Deepak");
name ==> Optional[Deepak]
jshell> name.isEmpty();
$4 ==> false
jshell> Optional<String> name1 = Optional.empty();
name1 ==> Optional.empty
jshell> name1.isEmpty();
$6 ==> true
Pattern recognizing methods
01
asMatchPredicate() - This method will create a predicate if pattern
matches with input string.
jshell> var pattern = Pattern.compile("deep").asMatchPredicate();
pattern ==>
java.util.regex.Pattern$$Lambda$17/0x00000008000b6c40@5abca1
e0
Removed Features
01
● Removal of com.sun.awt.AWTUtilities Class
● Removal of appletviewer Launcher
● Removal of Thread.destroy() and Thread.stop(Throwable)
Methods
● Removal of JVM-MANAGEMENT-MIB.mib
● Removal of Java Deployment Technologies
● Removal of JavaFX from the Oracle JDK
● JEP 320 Remove the Java EE and CORBA Modules
Deprecated Features
01
● ThreadPoolExecutor Should Not Specify a Dependency on
Finalization
● JEP 335 Deprecate the Nashorn JavaScript Engine
● Deprecate -XX+AggressiveOpts
● Obsolete Support for Commercial Features
● Deprecate Stream-Based GSSContext Methods
● JEP 336 Deprecate the Pack200 Tools and API
Migration to Java 11
01
Here are the recommended minimum versions for a few tools:
IntelliJ IDEA: 2018.2
Eclipse: Photon 4.9RC2 with Java 11 plugin
Maven: 3.5.0
compiler plugin: 3.8.0
surefire and failsafe: 2.22.0
Gradle: 5.0
01
Demo
References
01
● https://docs.oracle.com/en/java/javase/11/
● https://www.oracle.com/java/technologies/javase-jdk11-download
s.html
● https://www.geeksforgeeks.org/java-11-features-and-comparison/
● https://www.journaldev.com/24601/java-11-features
● https://blog.knoldus.com/string-functions-in-java-11/
Do remember to submit
feedback!
Thank You !

More Related Content

PDF
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
ODP
Java 9 Features
PDF
Java11 New Features
PDF
Core java complete notes - Contact at +91-814-614-5674
PDF
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
PPTX
Installing JDK and first java program
PPTX
JAVA-PPT'S.pptx
PPTX
Core java
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java 9 Features
Java11 New Features
Core java complete notes - Contact at +91-814-614-5674
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
Installing JDK and first java program
JAVA-PPT'S.pptx
Core java

What's hot (20)

PPTX
Spring boot
PDF
Spring Boot
PDF
Introduction to java (revised)
PDF
Java 17
PPTX
Spring boot Introduction
PPTX
Spring Boot Tutorial
PPTX
What's new in Java 11
PPTX
Spring boot - an introduction
PPTX
Spring Framework
PDF
Spring boot jpa
PDF
Java 10 New Features
PDF
Spring boot introduction
PPTX
Spring boot
PDF
Spring Boot
PPTX
Introduction to Spring Framework
PPTX
What is component in reactjs
PDF
Introduction to Spring Boot!
PPSX
Spring - Part 1 - IoC, Di and Beans
PPTX
Core java complete ppt(note)
PDF
JPA and Hibernate
Spring boot
Spring Boot
Introduction to java (revised)
Java 17
Spring boot Introduction
Spring Boot Tutorial
What's new in Java 11
Spring boot - an introduction
Spring Framework
Spring boot jpa
Java 10 New Features
Spring boot introduction
Spring boot
Spring Boot
Introduction to Spring Framework
What is component in reactjs
Introduction to Spring Boot!
Spring - Part 1 - IoC, Di and Beans
Core java complete ppt(note)
JPA and Hibernate
Ad

Similar to Introduction to Java 11 (20)

PDF
Whats new in Java 9,10,11,12
PDF
Java 11 - Keeping the Java Release Train on the Right Track
PDF
The features of java 11 vs. java 12
PDF
Summary of JDK10 and What will come into JDK11
PPTX
DevNexus 2020: Discover Modern Java
PDF
Summary of JDK10 and What will come into JDK11
PDF
Java features. Java 8, 9, 10, 11
PDF
Latest java
PDF
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
PDF
What's in the Latest Java
PDF
JDKs 10 to 14 (and beyond)
PDF
Amber and beyond: Java language changes
PDF
Java >= 9
PPTX
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
PPTX
New Features in JDK 8
PDF
Preparing your code for Java 9
PDF
Life beyond Java 8
PDF
JCConf 2021 - Java17: The Next LTS
PDF
Java10 and Java11 at JJUG CCC 2018 Spr
PDF
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
Whats new in Java 9,10,11,12
Java 11 - Keeping the Java Release Train on the Right Track
The features of java 11 vs. java 12
Summary of JDK10 and What will come into JDK11
DevNexus 2020: Discover Modern Java
Summary of JDK10 and What will come into JDK11
Java features. Java 8, 9, 10, 11
Latest java
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
What's in the Latest Java
JDKs 10 to 14 (and beyond)
Amber and beyond: Java language changes
Java >= 9
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
New Features in JDK 8
Preparing your code for Java 9
Life beyond Java 8
JCConf 2021 - Java17: The Next LTS
Java10 and Java11 at JJUG CCC 2018 Spr
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
Ad

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
PPTX
Self-Healing Test Automation Framework - Healenium
PPTX
Kanban Metrics Presentation (Project Management)
PPTX
Java 17 features and implementation.pptx
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
PPTX
GraalVM - A Step Ahead of JVM Presentation
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
DAPR - Distributed Application Runtime Presentation
PPTX
Introduction to Azure Virtual WAN Presentation
PPTX
Introduction to Argo Rollouts Presentation
PPTX
Intro to Azure Container App Presentation
PPTX
Insights Unveiled Test Reporting and Observability Excellence
PPTX
Introduction to Splunk Presentation (DevOps)
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
PPTX
AWS: Messaging Services in AWS Presentation
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
PPTX
Managing State & HTTP Requests In Ionic.
Angular Hydration Presentation (FrontEnd)
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Self-Healing Test Automation Framework - Healenium
Kanban Metrics Presentation (Project Management)
Java 17 features and implementation.pptx
Chaos Mesh Introducing Chaos in Kubernetes
GraalVM - A Step Ahead of JVM Presentation
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
DAPR - Distributed Application Runtime Presentation
Introduction to Azure Virtual WAN Presentation
Introduction to Argo Rollouts Presentation
Intro to Azure Container App Presentation
Insights Unveiled Test Reporting and Observability Excellence
Introduction to Splunk Presentation (DevOps)
Code Camp - Data Profiling and Quality Analysis Framework
AWS: Messaging Services in AWS Presentation
Amazon Cognito: A Primer on Authentication and Authorization
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Managing State & HTTP Requests In Ionic.

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Modernizing your data center with Dell and AMD
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Modernizing your data center with Dell and AMD
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Introduction to Java 11

  • 1. Presented By : Deepak Mehra(Sr.Software Consultant- L2) & Sanjana Aggarwal(Software Consultant) Introduction to Java 11
  • 2. Agenda 01 ● Java 11 ● How to download Java 11 free version ● Important changes and information. ● Java 11 Features and Enhancements ● Removed Features ● Deprecated Features ● Migration to Java 11 ● Demo
  • 3. Java 11 01 ● Java 11 is the second LTS release after Java 8. ● Java 11 onwards, Oracle JDK would no longer be free for commercial use. ● You can use it in developing stages but to use it commercially, you need to buy a license. If you don’t, you can get an invoice bill from Oracle any day!
  • 4. Java 11 free version 01 Below is the link to download Java 11’s free version which can be used for developments and educational purpose. https://www.oracle.com/java/technologies/javase-jdk11-downloads.html Java 11 onwards, they have two different JDK builds: ● Oracle JDK (commercial) ● Oracle OpenJDK (open source)
  • 5. Changes and information 01 ● The deployment stack required for running applets and web applications has been removed from JDK which was deprecated in JDK 9. ● Java language translation for French, German, Italian, Korean, Portuguese (Brazilian), Spanish, and Swedish is no longer provided. ● Updated packaging format for Windows has changed from tar.gz to .zip
  • 6. Java 11 Features 01 ● Running Java File with single command ● Local-Variable Syntax for Lambda Parameters ● New File Methods ● JEP 321: HTTP Client ● New utility methods in String class ● Nested Based Access Control ● TimeUnit Conversion ● Optional.isEmpty() ● Pattern recognizing methods
  • 7. Running file with single command 01 ● You do not have to compile the program to run it, you can simply go ahead and run the program without a hiccup. ● How does it happen? It compiles implicitly. This feature comes under JEP 330.
  • 8. Lambda Params 01 JDK 11 allows ‘var’ to be used in lambda expressions. var list = new ArrayList<String>();
  • 9. 01 Limitations of this feature:- You either define the type var on all the parameter or none (var a, var b) -> a+b // would do (var a, b) -> a + b // would not do (var a, String name) -> a + name // mixing not allowed Var a -> a // you have to use the parentheses
  • 10. File Methods 01 Three methods introduced in the file handling:- ● writeString() ● readString() ● isSameFile()
  • 11. JEP 321: HTTP Client It can be used to request HTTP resources over the network. This new API is a kind of built around three main classes ● HttpClient ● HttpRequest ● HttpResponse
  • 12. Utility functions in String class 01 As part of Java 11, 4 new string functions were introduced:- ● isBlank() ● lines() ● strip(), stripLeading(), stripTrailing() ● repeat(int value)
  • 13. Nested Based Access Control Basically, the nest term defines a new access control context that allows classes that are logically part of the same code entity, but which are compiled with distinct class files, to access each other's private members without the need for compilers to insert accessibility-broadening bridge methods.
  • 14. TimeUnit Conversion 01 This method convert is used to convert the given time to a unit like DAY, HOURS, MINUTES and for time too. jshell>TimeUnit c = TimeUnit.DAYS; Output: DAYS jshell>c.convert(Duration.ofHours(24)); Output: 1
  • 15. Optional.isEmpty() 01 This method returns false if the value of any optional object is empty and else returns true. jshell> Optional<String> name = Optional.of("Deepak"); name ==> Optional[Deepak] jshell> name.isEmpty(); $4 ==> false
  • 16. jshell> Optional<String> name1 = Optional.empty(); name1 ==> Optional.empty jshell> name1.isEmpty(); $6 ==> true
  • 17. Pattern recognizing methods 01 asMatchPredicate() - This method will create a predicate if pattern matches with input string. jshell> var pattern = Pattern.compile("deep").asMatchPredicate(); pattern ==> java.util.regex.Pattern$$Lambda$17/0x00000008000b6c40@5abca1 e0
  • 18. Removed Features 01 ● Removal of com.sun.awt.AWTUtilities Class ● Removal of appletviewer Launcher ● Removal of Thread.destroy() and Thread.stop(Throwable) Methods ● Removal of JVM-MANAGEMENT-MIB.mib ● Removal of Java Deployment Technologies ● Removal of JavaFX from the Oracle JDK ● JEP 320 Remove the Java EE and CORBA Modules
  • 19. Deprecated Features 01 ● ThreadPoolExecutor Should Not Specify a Dependency on Finalization ● JEP 335 Deprecate the Nashorn JavaScript Engine ● Deprecate -XX+AggressiveOpts ● Obsolete Support for Commercial Features ● Deprecate Stream-Based GSSContext Methods ● JEP 336 Deprecate the Pack200 Tools and API
  • 20. Migration to Java 11 01 Here are the recommended minimum versions for a few tools: IntelliJ IDEA: 2018.2 Eclipse: Photon 4.9RC2 with Java 11 plugin Maven: 3.5.0 compiler plugin: 3.8.0 surefire and failsafe: 2.22.0 Gradle: 5.0
  • 22. References 01 ● https://docs.oracle.com/en/java/javase/11/ ● https://www.oracle.com/java/technologies/javase-jdk11-download s.html ● https://www.geeksforgeeks.org/java-11-features-and-comparison/ ● https://www.journaldev.com/24601/java-11-features ● https://blog.knoldus.com/string-functions-in-java-11/
  • 23. Do remember to submit feedback!