SlideShare a Scribd company logo
© Henri Tremblay 2015
Henri Tremblay
Managing Director, Head of TS Canada
TradingScreen
Discover Modern Java
Java 7, 8, 9, 10, 11, 12, 13, 14, 15
@henri_tremblay
2
Henri Tremblay
• More or less made possible class mocking and proxying
• Coined the term “partial mocking”
3
Henri Tremblay
• More or less made possible class mocking and proxying
• Coined the term “partial mocking”
4
7 15
5
O’Reilly Learning (ex Safari)
Long version every two months at
https://learning.oreilly.com/
Next one: March 18
6
Show of hands
7
Questions
8
Java Delivery Process
9
Java 6 Java 7 Java 8
Old delivery process
5 years 3 years 3 years
10
Java 9 Java 10 Java 11
New delivery process
6 months 6 months 6 months
11
2006 20142007 2008 2009 2010 2011 2012 2013 20202015 2016 2017 2018 2019 2021 2022 2023 2024 2025 2026
Java 6 (last from Sun)
Java 7
Java 8 (LTS)
Java 5
Java 9
Java 10
Java 13
Java 12
Java 11 (LTS)
12
TL;DR
OracleJDK: Free for development, supported for 6 months
LTS versions have extended ($$$) support by Oracle
Identical to OpenJDK but with support
Oracle OpenJDK: Free forever, supported for 6 months
Other OpenJDK: Free forever, supported after 6 months by RedHat
(Java 8 and 11)
Built by AdoptOpenJDK (https://adoptopenjdk.net/), Azul, IBM, Amazon…
Other JVMs (Amazon, Azul, IBM, RedHat, etc.)
Supported by their vendor as they wish
A lot of “May” and “Possibly” in the party line
https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244
13
@Deprecated
is back
Stronger than ever
14
/**
* Counts the number of stack frames in this thread. The thread must
* be suspended.
*
* @return the number of stack frames in this thread.
* @throws IllegalThreadStateException if this thread is not
* suspended.
* @deprecated The definition of this call depends on {@link #suspend},
* which is deprecated. Further, the results of this call
* were never well-defined.
* This method is subject to removal in a future version of Java SE.
* @see StackWalker
*/
@Deprecated(since="1.2", forRemoval=true)
public native int countStackFrames();
15
Prepare to do some stretching
Java 8 Java 9 Java 10 Java 11
What any sane person will want his/her framework to support
16
Prepare to do some stretching
Java 8 Java 9 Java 10 Java 11
What any sane person will want his/her framework to support
Unsafe.defineClass()
MethodHandles.defineClass()
Unsafe.defineClass()
removed
17
GC
18
Java < 8
• Serial
• Parallel
• ParallelOld
• CMS
• iCMS
Java 8
• G1
Java 9
• Removed iCMS
Java 11
• Epsilon
• Z
Java 12
• Shenandoah
Garbage collectors for all
19
Java 7
(2011, first from Oracle)
20
JAVA 7 BROUGHT A LOT OF
SYNTACTIC SUGAR
(plus invokeDynamic, forkJoin, better file IO)
21
Switch for strings
switch(s) {
case "hello":
return "world";
case "bonjour":
return "le monde";
}
22
Switch 02
23
Multiple catches
try {
// ... do stuff
}
catch (IOException | SerializationException e) {
log.error("My error", e);
}
Instead of
try {
// ... do stuff
} catch (IOException e) {
log.error("My error", e);
} catch (SerializationException e) {
log.error("My error", e);
}
24
Auto Closeable
Before
InputStream in = new FileInputStream("allo.txt");
try {
// … do stuff
} finally {
try { in.close(); } catch(IOException e) {}
}
After
try(InputStream in = new FileInputStream("allo.txt")) {
// … do stuff
}
25
Auto Closeable
Real code you should do
InputStream in = new FileInputStream("allo.txt");
try {
// … do stuff
in.close();
} catch(IOException e) {
try {
in.close();
} catch(IOException e1) {
e.addSuppressed(e1);
}
throw e;
}
26
File IO API
java.nio.file.Files
// also: file watcher, symbolic links, file locks,
// copy … Look in java.nio.file
27
ReadFile 03
28
Java 8
(2014)
29
JAVA 8: LAMBDA!
(and also a new date API, default methods, metaspace, Nashorn,
JavaFX and CompletableFuture)
30
Date / Time API
Core ideas:
Immutable
A time is a time, a date is a date. Not always both (like java.util.Date)
Not everyone uses the same calendar (the same Chronology)
LocalDate, LocalTime, LocalDateTime  Local. No time zone
OffsetDateTime, OffsetTime  Time with an offset from
Greenwich
ZonedDateTime  LocalDateTime with a time zone
Duration, Period  Time span
Instant  Timestamp
Formatting  Easy and thread-safe formatting
31
Date / Time API (example)
LocalDateTime now = LocalDateTime.now();
String thatSpecialDay = now
.withDayOfMonth(1)
.atZone(ZoneId.of("Europe/Paris"))
.plus(Duration.ofDays(5))
.format(DateTimeFormatter.ISO_ZONED_DATE_TIME);
System.out.println(thatSpecialDay);
Output
2016-09-06T17:45:22.488+01:00[Europe/Paris]
32
This is a function:
This is a lambda:
Lambda calculus
33
c = coll.forEach(
(a, b) –> pow(a, 2) + pow(b, 2)
)
Functional programming
34
Under the hood 05
35
Serializable 06
36
Type inference 07
37
Method references
public static class Passenger {
public void inboard(Train train) {
System.out.println("Inboard " + train);
}
}
public static class Train {
public Train () { }
public Train (int serial) { }
public static void paintBlue(Train train) {
System.out.println("Painted blue " + train);
}
public void repair() {
System.out.println( "Repaired " + this);
}
}
List<Train> trains = Arrays.asList(train);
// static method
trains.forEach(Train::paintBlue);
// instance method
trains.forEach(Train::repair);
// instance method taking this in param
Passenger p = new Passenger();
trains.forEach(p::inboard);
trains.forEach(System.out::println); // useful!
// constructor
public static Train create(Supplier<Train> supplier) {
return supplier.get();
}
Train train = Train.create(Train::new);
public static Train create(IntFunction<Train> func) {
return func.apply(42);
}
Train train = Train.create(Train::new);
38
Method references
public static class Passenger {
public void inboard(Train train) {
System.out.println("Inboard " + train);
}
}
public static class Train {
public Train () { }
public Train (int serial) { }
public static void paintBlue(Train train) {
System.out.println("Painted blue " + train);
}
public void repair() {
System.out.println( "Repaired " + this);
}
}
List<Train> trains = Arrays.asList(train);
// static method
trains.forEach(Train::paintBlue);
// instance method
trains.forEach(Train::repair);
// instance method taking this in param
Passenger p = new Passenger();
trains.forEach(p::inboard);
trains.forEach(System.out::println); // useful!
// constructor
public static Train create(Supplier<Train> supplier) {
return supplier.get();
}
Train train = Train.create(Train::new);
public static Train create(IntFunction<Train> func) {
return func.apply(42);
}
Train train = Train.create(Train::new);
39
Method references
public static class Passenger {
public void inboard(Train train) {
System.out.println("Inboard " + train);
}
}
public static class Train {
public Train () { }
public Train (int serial) { }
public static void paintBlue(Train train) {
System.out.println("Painted blue " + train);
}
public void repair() {
System.out.println( "Repaired " + this);
}
}
List<Train> trains = Arrays.asList(train);
// static method
trains.forEach(Train::paintBlue);
// instance method
trains.forEach(Train::repair);
// instance method taking this in param
Passenger p = new Passenger();
trains.forEach(p::inboard);
trains.forEach(System.out::println); // useful!
// constructor
public static Train create(Supplier<Train> supplier) {
return supplier.get();
}
Train train = Train.create(Train::new);
public static Train create(IntFunction<Train> func) {
return func.apply(42);
}
Train train = Train.create(Train::new);
40
NullPointerException on method reference 08
41
Java 9
(2017)
42
JAVA 9: MODULES!
(and G1 by default, var handles, new http client, jshell, jcmd,
immutable collections, unified JVM logging)
43
Improved try-with-resource
ByteArrayOutputStream in = new ByteArrayOutputStream();
try(in) {
}
44
Modern mustache instantiation
Map<String, String> map = new HashMap<>() {{
put("key", "value");
}};
45
Modern map instantiation (Java 9)
Map<String, String> map =
Map.of(
"key1", "value1",
"key2", "value2");
46
Slightly longer map instantiation
private Map<String, String> map = new HashMap<>();
{
map.put("key", "value");
}
47
Interface private methods
public interface Printer {
private void print(String s) {
System.out.println(s);
}
default void printAll(String[] list) {
Arrays.stream(list).forEach(this::print);
}
}
48
Java SE Modules
Credits: Oracle
49
Modules
50
Java 10
(March 2018)
51
JEP 286: Local-Variable Type Inference
JEP 296: Consolidate the JDK Forest into a Single Repository
JEP 304: Garbage-Collector Interface
JEP 307: Parallel Full GC for G1
JEP 310: Application Class-Data Sharing
JEP 312: Thread-Local Handshakes
JEP 313: Remove the Native-Header Generation Tool (javah)
JEP 314: Additional Unicode Language-Tag Extensions
JEP 316: Heap Allocation on Alternative Memory Devices
JEP 317: Experimental Java-Based JIT Compiler (aka GraalVM)
JEP 319: Root Certificates
JEP 322: Time-Based Release Versioning
Var!
52
Var inference 13
53
Keywords
while, if, abstract, public, default,
class, enum (Java 5), _ (Java 9)
Restricted Keywords
open, module, to, with
Literals
true, false, null
Reserved identifier
var
What is var?
54
Var inference 14
55
Java 11
(September 2018)
56
JEP 181: Nest-Based Access Control
JEP 309: Dynamic Class-File Constants
JEP 315: Improve Aarch64 Intrinsics
JEP 318: Epsilon: A No-Op Garbage Collector
JEP 320: Remove the Java EE and CORBA Modules
JEP 321: HTTP Client (Standard)
JEP 323: Local-Variable Syntax for Lambda Parameters
JEP 324: Key Agreement with Curve25519 and Curve448
JEP 327: Unicode 10
JEP 328: Flight Recorder
JEP 329: ChaCha20 and Poly1305 Cryptographic Algorithms
JEP 330: Launch Single-File Source-Code Programs
JEP 331: Low-Overhead Heap Profiling
JEP 332: Transport Layer Security (TLS) 1.3
JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
JEP 335: Deprecate the Nashorn JavaScript Engine
JEP 336: Deprecate the Pack200 Tools and API
Cleanup!
57
Single file program Java11
58
Var in a lambda 14
59
Java 12
(March 2019)
60
JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
JEP 230: Microbenchmark Suite
JEP 325: Switch Expressions (Preview)
JEP 334: JVM Constants API
JEP 340: One AArch64 Port, Not Two
JEP 341: Default CDS Archives
JEP 344: Abortable Mixed Collections for G1
JEP 346: Promptly Return Unused Committed Memory from G1
Switch expressions!
61
private boolean isWeekDay(DayOfWeek day) {
boolean weekDay;
switch(day) {
case MONDAY:
case TUESDAY:
case WEDNESDAY:
case THURSDAY:
case FRIDAY:
weekDay = true;
break;
case SATURDAY:
case SUNDAY:
weekDay = false;
default:
throw new IllegalStateException("A new day was added in my week: " + day);
}
return weekDay;
}
Switch expressions
62
private boolean isWeekDay(DayOfWeek day) {
boolean weekDay;
switch(day) {
case MONDAY:
case TUESDAY:
case WEDNESDAY:
case THURSDAY:
case FRIDAY:
weekDay = true;
break;
case SATURDAY:
case SUNDAY:
weekDay = false;
break;
default:
throw new IllegalStateException("A new day was added in my week: " + day);
}
return weekDay;
}
Switch expressions
63
private boolean isWeekDay(DayOfWeek day) {
boolean weekDay;
switch(day) {
case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> weekDay = true;
case SATURDAY, SUNDAY -> weekDay = false;
default -> throw new IllegalStateException("A new day was added in my week: " + day);
}
return weekDay;
}
Switch expressions
64
private boolean isWeekDay(DayOfWeek day) {
boolean weekDay = switch(day) {
case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> true;
case SATURDAY, SUNDAY -> false;
default -> throw new IllegalStateException("A new day was added in my week: " + day);
};
return weekDay;
}
Switch expressions
65
private boolean isWeekDay(DayOfWeek day) {
return switch(day) {
case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> true;
case SATURDAY, SUNDAY -> false;
default -> throw new IllegalStateException("A new day was added in my week: " + day);
};
}
Switch expressions
66
Java 13
(September 2019)
67
JEP 350: Dynamic CDS Archives
JEP 351: ZGC: Uncommit Unused Memory
JEP 353: Reimplement the Legacy Socket API
JEP 354: Switch Expressions (Preview)
JEP 355: Text Blocks (Preview)
Text Block!
68
private boolean isWeekDay(DayOfWeek day) {
return switch(day) {
case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> true;
case SATURDAY, SUNDAY -> false;
default -> {
if(onEarth) {
yield false;
}
yield true;
}
};
}
Switch expressions (still a preview)
69
String script = """
function hello() {
print('"Hello, world"');
}
hello();
""";
Text Block (JEP 355)
70
Java 14
(March 2020)
71
JEP 305: Pattern Matching for instanceof (Preview)
JEP 343: Packaging Tool (Incubator)
JEP 345: NUMA-Aware Memory Allocation for G1
JEP 349: JFR Event Streaming
JEP 352: Non-Volatile Mapped Byte Buffers
JEP 358: Helpful NullPointerExceptions
JEP 359: Records (Preview)
JEP 361: Switch Expressions (Standard)
JEP 362: Deprecate the Solaris and SPARC Ports
JEP 363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector
JEP 364: ZGC on macOS
JEP 365: ZGC on Windows
JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination
JEP 367: Remove the Pack200 Tools and API
JEP 368: Text Blocks (Second Preview)
JEP 370: Foreign-Memory Access API (Incubator)
Big one
72
Text Block 16
73
Helpful NPE 17
74
PatternMatching for instanceof 18
75
Records 19
76
Packaging tools (package dir)
77
Java 15
(September 2020)
78
Nothing to see yet
Boring
79
The End
80
Who has learned
something today?
?
81
Java Champions – Java is still free
https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244
Adopt OpenJDK
https://adoptopenjdk.net/
Maurice Naftalin’s Lambda FAQ
http://www.lambdafaq.org/
Zeroturnaround Module Cheat Sheet
http://files.zeroturnaround.com/pdf/RebelLabs-Java-9-modules-cheat-sheet.pdf
Var styleguide
http://openjdk.java.net/projects/amber/LVTIstyle.html
Heinz Kabutz’s online course
https://javaspecialists.teachable.com/courses
Links
82
Modern Java in Action
Raoul-Gabriel Urma and Mario Fusco
Mastering Lambdas
Maurice Naftalin
Java 9 Modularity
Sander Mak and Paul Bakker
Core Java
Cay S. Horstmann
Books
83
Questions? http://montreal-jug.org
?
http://easymock.org
http://objenesis.org
Henri Tremblay
http://blog.tremblay.pro
@henri_tremblay
https://www.tradingscreen.com/careers

More Related Content

What's hot

Smart Migration to JDK 8
Smart Migration to JDK 8Smart Migration to JDK 8
Smart Migration to JDK 8
Geertjan Wielenga
 
JDK1.6
JDK1.6JDK1.6
JDK1.6
india_mani
 
Java concurrency questions and answers
Java concurrency questions and answers Java concurrency questions and answers
Java concurrency questions and answers
CodeOps Technologies LLP
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
Simon Ritter
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
Rafael Winterhalter
 
Sailing with Java 8 Streams
Sailing with Java 8 StreamsSailing with Java 8 Streams
Sailing with Java 8 Streams
Ganesh Samarthyam
 
From Java 6 to Java 7 reference
From Java 6 to Java 7 referenceFrom Java 6 to Java 7 reference
From Java 6 to Java 7 reference
Giacomo Veneri
 
De Java 8 a Java 17
De Java 8 a Java 17De Java 8 a Java 17
De Java 8 a Java 17
Víctor Leonel Orozco López
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
Hiro Asari
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code Examples
Naresh Chintalcheru
 
Java11 New Features
Java11 New FeaturesJava11 New Features
Java11 New Features
Haim Michael
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
JAX London
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습
DoHyun Jung
 
Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Martin Toshev
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and Simple
Ben Mabey
 
Productive Programming in Java 8 - with Lambdas and Streams
Productive Programming in Java 8 - with Lambdas and Streams Productive Programming in Java 8 - with Lambdas and Streams
Productive Programming in Java 8 - with Lambdas and Streams
Ganesh Samarthyam
 
Java 10, Java 11 and beyond
Java 10, Java 11 and beyondJava 10, Java 11 and beyond
Java 10, Java 11 and beyond
Rafael Winterhalter
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningCarol McDonald
 
JRuby and You
JRuby and YouJRuby and You
JRuby and You
Hiro Asari
 
Java Bytecode for Discriminating Developers - JavaZone 2011
Java Bytecode for Discriminating Developers - JavaZone 2011Java Bytecode for Discriminating Developers - JavaZone 2011
Java Bytecode for Discriminating Developers - JavaZone 2011Anton Arhipov
 

What's hot (20)

Smart Migration to JDK 8
Smart Migration to JDK 8Smart Migration to JDK 8
Smart Migration to JDK 8
 
JDK1.6
JDK1.6JDK1.6
JDK1.6
 
Java concurrency questions and answers
Java concurrency questions and answers Java concurrency questions and answers
Java concurrency questions and answers
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
 
Sailing with Java 8 Streams
Sailing with Java 8 StreamsSailing with Java 8 Streams
Sailing with Java 8 Streams
 
From Java 6 to Java 7 reference
From Java 6 to Java 7 referenceFrom Java 6 to Java 7 reference
From Java 6 to Java 7 reference
 
De Java 8 a Java 17
De Java 8 a Java 17De Java 8 a Java 17
De Java 8 a Java 17
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code Examples
 
Java11 New Features
Java11 New FeaturesJava11 New Features
Java11 New Features
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습
 
Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Concurrency Utilities in Java 8
Concurrency Utilities in Java 8
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and Simple
 
Productive Programming in Java 8 - with Lambdas and Streams
Productive Programming in Java 8 - with Lambdas and Streams Productive Programming in Java 8 - with Lambdas and Streams
Productive Programming in Java 8 - with Lambdas and Streams
 
Java 10, Java 11 and beyond
Java 10, Java 11 and beyondJava 10, Java 11 and beyond
Java 10, Java 11 and beyond
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
 
JRuby and You
JRuby and YouJRuby and You
JRuby and You
 
Java Bytecode for Discriminating Developers - JavaZone 2011
Java Bytecode for Discriminating Developers - JavaZone 2011Java Bytecode for Discriminating Developers - JavaZone 2011
Java Bytecode for Discriminating Developers - JavaZone 2011
 

Similar to DevNexus 2020: Discover Modern Java

OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
Henri Tremblay
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
Víctor Leonel Orozco López
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
Víctor Leonel Orozco López
 
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ..."Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
Vadym Kazulkin
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
Paul King
 
Modern Java Development
Modern Java DevelopmentModern Java Development
Modern Java Development
Angel Conde Manjon
 
DevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programmingDevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programming
Henri Tremblay
 
Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools Race
Baruch Sadogursky
 
Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11
Ivelin Yanev
 
Inside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGInside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUG
Sylvain Wallez
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
Sylvain Wallez
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
Mattias Karlsson
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)
Martijn Verburg
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Agora Group
 
Core java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutionsCore java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutionsQUONTRASOLUTIONS
 
Java 9 features
Java 9 featuresJava 9 features
Java 9 features
shrinath97
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Vadym Kazulkin
 
Java review00
Java review00Java review00
Java review00saryu2011
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
Mauricio "Maltron" Leal
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
PROIDEA
 

Similar to DevNexus 2020: Discover Modern Java (20)

OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
OracleCode One 2018: Java 5, 6, 7, 8, 9, 10, 11: What Did You Miss?
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
 
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ..."Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
 
Modern Java Development
Modern Java DevelopmentModern Java Development
Modern Java Development
 
DevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programmingDevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programming
 
Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools Race
 
Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11
 
Inside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGInside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUG
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
 
Core java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutionsCore java over view basics introduction by quontra solutions
Core java over view basics introduction by quontra solutions
 
Java 9 features
Java 9 featuresJava 9 features
Java 9 features
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
 
Java review00
Java review00Java review00
Java review00
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
 

More from Henri Tremblay

Confoo 2018: Être pragmatique
Confoo 2018: Être pragmatiqueConfoo 2018: Être pragmatique
Confoo 2018: Être pragmatique
Henri Tremblay
 
Do you know your mock? - Madras JUG 20171028
Do you know your mock? - Madras JUG 20171028Do you know your mock? - Madras JUG 20171028
Do you know your mock? - Madras JUG 20171028
Henri Tremblay
 
Be Pragmatic - JavaOne 2017
Be Pragmatic - JavaOne 2017Be Pragmatic - JavaOne 2017
Be Pragmatic - JavaOne 2017
Henri Tremblay
 
Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017
Henri Tremblay
 
JavaOne 2016 - Learn Lambda and functional programming
JavaOne 2016 - Learn Lambda and functional programmingJavaOne 2016 - Learn Lambda and functional programming
JavaOne 2016 - Learn Lambda and functional programming
Henri Tremblay
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Henri Tremblay
 
Confoo 2016: Initiation aux tests de charge
Confoo 2016: Initiation aux tests de chargeConfoo 2016: Initiation aux tests de charge
Confoo 2016: Initiation aux tests de charge
Henri Tremblay
 
Generics and Lambdas cocktail explained - Montreal JUG
Generics and Lambdas cocktail explained  - Montreal JUGGenerics and Lambdas cocktail explained  - Montreal JUG
Generics and Lambdas cocktail explained - Montreal JUG
Henri Tremblay
 
Réactif, parallèle, asynchrone. Pourquoi!
Réactif, parallèle, asynchrone. Pourquoi!Réactif, parallèle, asynchrone. Pourquoi!
Réactif, parallèle, asynchrone. Pourquoi!
Henri Tremblay
 
Microbenchmarking with JMH
Microbenchmarking with JMHMicrobenchmarking with JMH
Microbenchmarking with JMH
Henri Tremblay
 
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUGLambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Henri Tremblay
 
Vivre en parallèle - Softshake 2013
Vivre en parallèle - Softshake 2013Vivre en parallèle - Softshake 2013
Vivre en parallèle - Softshake 2013
Henri Tremblay
 
Performance perpétuelle (Devopsdays Paris 2013)
Performance perpétuelle (Devopsdays Paris 2013)Performance perpétuelle (Devopsdays Paris 2013)
Performance perpétuelle (Devopsdays Paris 2013)
Henri Tremblay
 
DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...
DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...
DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...
Henri Tremblay
 

More from Henri Tremblay (15)

Confoo 2018: Être pragmatique
Confoo 2018: Être pragmatiqueConfoo 2018: Être pragmatique
Confoo 2018: Être pragmatique
 
Do you know your mock? - Madras JUG 20171028
Do you know your mock? - Madras JUG 20171028Do you know your mock? - Madras JUG 20171028
Do you know your mock? - Madras JUG 20171028
 
Be Pragmatic - JavaOne 2017
Be Pragmatic - JavaOne 2017Be Pragmatic - JavaOne 2017
Be Pragmatic - JavaOne 2017
 
Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017
 
JavaOne 2016 - Learn Lambda and functional programming
JavaOne 2016 - Learn Lambda and functional programmingJavaOne 2016 - Learn Lambda and functional programming
JavaOne 2016 - Learn Lambda and functional programming
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
 
Confoo 2016: Initiation aux tests de charge
Confoo 2016: Initiation aux tests de chargeConfoo 2016: Initiation aux tests de charge
Confoo 2016: Initiation aux tests de charge
 
Generics and Lambdas cocktail explained - Montreal JUG
Generics and Lambdas cocktail explained  - Montreal JUGGenerics and Lambdas cocktail explained  - Montreal JUG
Generics and Lambdas cocktail explained - Montreal JUG
 
Réactif, parallèle, asynchrone. Pourquoi!
Réactif, parallèle, asynchrone. Pourquoi!Réactif, parallèle, asynchrone. Pourquoi!
Réactif, parallèle, asynchrone. Pourquoi!
 
Perf university
Perf universityPerf university
Perf university
 
Microbenchmarking with JMH
Microbenchmarking with JMHMicrobenchmarking with JMH
Microbenchmarking with JMH
 
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUGLambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
 
Vivre en parallèle - Softshake 2013
Vivre en parallèle - Softshake 2013Vivre en parallèle - Softshake 2013
Vivre en parallèle - Softshake 2013
 
Performance perpétuelle (Devopsdays Paris 2013)
Performance perpétuelle (Devopsdays Paris 2013)Performance perpétuelle (Devopsdays Paris 2013)
Performance perpétuelle (Devopsdays Paris 2013)
 
DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...
DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...
DevoxxFR 2013: Lambda are coming. Meanwhile, are you sure we've mastered the ...
 

Recently uploaded

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

DevNexus 2020: Discover Modern Java

  • 1. © Henri Tremblay 2015 Henri Tremblay Managing Director, Head of TS Canada TradingScreen Discover Modern Java Java 7, 8, 9, 10, 11, 12, 13, 14, 15 @henri_tremblay
  • 2. 2 Henri Tremblay • More or less made possible class mocking and proxying • Coined the term “partial mocking”
  • 3. 3 Henri Tremblay • More or less made possible class mocking and proxying • Coined the term “partial mocking”
  • 5. 5 O’Reilly Learning (ex Safari) Long version every two months at https://learning.oreilly.com/ Next one: March 18
  • 9. 9 Java 6 Java 7 Java 8 Old delivery process 5 years 3 years 3 years
  • 10. 10 Java 9 Java 10 Java 11 New delivery process 6 months 6 months 6 months
  • 11. 11 2006 20142007 2008 2009 2010 2011 2012 2013 20202015 2016 2017 2018 2019 2021 2022 2023 2024 2025 2026 Java 6 (last from Sun) Java 7 Java 8 (LTS) Java 5 Java 9 Java 10 Java 13 Java 12 Java 11 (LTS)
  • 12. 12 TL;DR OracleJDK: Free for development, supported for 6 months LTS versions have extended ($$$) support by Oracle Identical to OpenJDK but with support Oracle OpenJDK: Free forever, supported for 6 months Other OpenJDK: Free forever, supported after 6 months by RedHat (Java 8 and 11) Built by AdoptOpenJDK (https://adoptopenjdk.net/), Azul, IBM, Amazon… Other JVMs (Amazon, Azul, IBM, RedHat, etc.) Supported by their vendor as they wish A lot of “May” and “Possibly” in the party line https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244
  • 14. 14 /** * Counts the number of stack frames in this thread. The thread must * be suspended. * * @return the number of stack frames in this thread. * @throws IllegalThreadStateException if this thread is not * suspended. * @deprecated The definition of this call depends on {@link #suspend}, * which is deprecated. Further, the results of this call * were never well-defined. * This method is subject to removal in a future version of Java SE. * @see StackWalker */ @Deprecated(since="1.2", forRemoval=true) public native int countStackFrames();
  • 15. 15 Prepare to do some stretching Java 8 Java 9 Java 10 Java 11 What any sane person will want his/her framework to support
  • 16. 16 Prepare to do some stretching Java 8 Java 9 Java 10 Java 11 What any sane person will want his/her framework to support Unsafe.defineClass() MethodHandles.defineClass() Unsafe.defineClass() removed
  • 17. 17 GC
  • 18. 18 Java < 8 • Serial • Parallel • ParallelOld • CMS • iCMS Java 8 • G1 Java 9 • Removed iCMS Java 11 • Epsilon • Z Java 12 • Shenandoah Garbage collectors for all
  • 19. 19 Java 7 (2011, first from Oracle)
  • 20. 20 JAVA 7 BROUGHT A LOT OF SYNTACTIC SUGAR (plus invokeDynamic, forkJoin, better file IO)
  • 21. 21 Switch for strings switch(s) { case "hello": return "world"; case "bonjour": return "le monde"; }
  • 23. 23 Multiple catches try { // ... do stuff } catch (IOException | SerializationException e) { log.error("My error", e); } Instead of try { // ... do stuff } catch (IOException e) { log.error("My error", e); } catch (SerializationException e) { log.error("My error", e); }
  • 24. 24 Auto Closeable Before InputStream in = new FileInputStream("allo.txt"); try { // … do stuff } finally { try { in.close(); } catch(IOException e) {} } After try(InputStream in = new FileInputStream("allo.txt")) { // … do stuff }
  • 25. 25 Auto Closeable Real code you should do InputStream in = new FileInputStream("allo.txt"); try { // … do stuff in.close(); } catch(IOException e) { try { in.close(); } catch(IOException e1) { e.addSuppressed(e1); } throw e; }
  • 26. 26 File IO API java.nio.file.Files // also: file watcher, symbolic links, file locks, // copy … Look in java.nio.file
  • 29. 29 JAVA 8: LAMBDA! (and also a new date API, default methods, metaspace, Nashorn, JavaFX and CompletableFuture)
  • 30. 30 Date / Time API Core ideas: Immutable A time is a time, a date is a date. Not always both (like java.util.Date) Not everyone uses the same calendar (the same Chronology) LocalDate, LocalTime, LocalDateTime  Local. No time zone OffsetDateTime, OffsetTime  Time with an offset from Greenwich ZonedDateTime  LocalDateTime with a time zone Duration, Period  Time span Instant  Timestamp Formatting  Easy and thread-safe formatting
  • 31. 31 Date / Time API (example) LocalDateTime now = LocalDateTime.now(); String thatSpecialDay = now .withDayOfMonth(1) .atZone(ZoneId.of("Europe/Paris")) .plus(Duration.ofDays(5)) .format(DateTimeFormatter.ISO_ZONED_DATE_TIME); System.out.println(thatSpecialDay); Output 2016-09-06T17:45:22.488+01:00[Europe/Paris]
  • 32. 32 This is a function: This is a lambda: Lambda calculus
  • 33. 33 c = coll.forEach( (a, b) –> pow(a, 2) + pow(b, 2) ) Functional programming
  • 37. 37 Method references public static class Passenger { public void inboard(Train train) { System.out.println("Inboard " + train); } } public static class Train { public Train () { } public Train (int serial) { } public static void paintBlue(Train train) { System.out.println("Painted blue " + train); } public void repair() { System.out.println( "Repaired " + this); } } List<Train> trains = Arrays.asList(train); // static method trains.forEach(Train::paintBlue); // instance method trains.forEach(Train::repair); // instance method taking this in param Passenger p = new Passenger(); trains.forEach(p::inboard); trains.forEach(System.out::println); // useful! // constructor public static Train create(Supplier<Train> supplier) { return supplier.get(); } Train train = Train.create(Train::new); public static Train create(IntFunction<Train> func) { return func.apply(42); } Train train = Train.create(Train::new);
  • 38. 38 Method references public static class Passenger { public void inboard(Train train) { System.out.println("Inboard " + train); } } public static class Train { public Train () { } public Train (int serial) { } public static void paintBlue(Train train) { System.out.println("Painted blue " + train); } public void repair() { System.out.println( "Repaired " + this); } } List<Train> trains = Arrays.asList(train); // static method trains.forEach(Train::paintBlue); // instance method trains.forEach(Train::repair); // instance method taking this in param Passenger p = new Passenger(); trains.forEach(p::inboard); trains.forEach(System.out::println); // useful! // constructor public static Train create(Supplier<Train> supplier) { return supplier.get(); } Train train = Train.create(Train::new); public static Train create(IntFunction<Train> func) { return func.apply(42); } Train train = Train.create(Train::new);
  • 39. 39 Method references public static class Passenger { public void inboard(Train train) { System.out.println("Inboard " + train); } } public static class Train { public Train () { } public Train (int serial) { } public static void paintBlue(Train train) { System.out.println("Painted blue " + train); } public void repair() { System.out.println( "Repaired " + this); } } List<Train> trains = Arrays.asList(train); // static method trains.forEach(Train::paintBlue); // instance method trains.forEach(Train::repair); // instance method taking this in param Passenger p = new Passenger(); trains.forEach(p::inboard); trains.forEach(System.out::println); // useful! // constructor public static Train create(Supplier<Train> supplier) { return supplier.get(); } Train train = Train.create(Train::new); public static Train create(IntFunction<Train> func) { return func.apply(42); } Train train = Train.create(Train::new);
  • 42. 42 JAVA 9: MODULES! (and G1 by default, var handles, new http client, jshell, jcmd, immutable collections, unified JVM logging)
  • 43. 43 Improved try-with-resource ByteArrayOutputStream in = new ByteArrayOutputStream(); try(in) { }
  • 44. 44 Modern mustache instantiation Map<String, String> map = new HashMap<>() {{ put("key", "value"); }};
  • 45. 45 Modern map instantiation (Java 9) Map<String, String> map = Map.of( "key1", "value1", "key2", "value2");
  • 46. 46 Slightly longer map instantiation private Map<String, String> map = new HashMap<>(); { map.put("key", "value"); }
  • 47. 47 Interface private methods public interface Printer { private void print(String s) { System.out.println(s); } default void printAll(String[] list) { Arrays.stream(list).forEach(this::print); } }
  • 51. 51 JEP 286: Local-Variable Type Inference JEP 296: Consolidate the JDK Forest into a Single Repository JEP 304: Garbage-Collector Interface JEP 307: Parallel Full GC for G1 JEP 310: Application Class-Data Sharing JEP 312: Thread-Local Handshakes JEP 313: Remove the Native-Header Generation Tool (javah) JEP 314: Additional Unicode Language-Tag Extensions JEP 316: Heap Allocation on Alternative Memory Devices JEP 317: Experimental Java-Based JIT Compiler (aka GraalVM) JEP 319: Root Certificates JEP 322: Time-Based Release Versioning Var!
  • 53. 53 Keywords while, if, abstract, public, default, class, enum (Java 5), _ (Java 9) Restricted Keywords open, module, to, with Literals true, false, null Reserved identifier var What is var?
  • 56. 56 JEP 181: Nest-Based Access Control JEP 309: Dynamic Class-File Constants JEP 315: Improve Aarch64 Intrinsics JEP 318: Epsilon: A No-Op Garbage Collector JEP 320: Remove the Java EE and CORBA Modules JEP 321: HTTP Client (Standard) JEP 323: Local-Variable Syntax for Lambda Parameters JEP 324: Key Agreement with Curve25519 and Curve448 JEP 327: Unicode 10 JEP 328: Flight Recorder JEP 329: ChaCha20 and Poly1305 Cryptographic Algorithms JEP 330: Launch Single-File Source-Code Programs JEP 331: Low-Overhead Heap Profiling JEP 332: Transport Layer Security (TLS) 1.3 JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental) JEP 335: Deprecate the Nashorn JavaScript Engine JEP 336: Deprecate the Pack200 Tools and API Cleanup!
  • 58. 58 Var in a lambda 14
  • 60. 60 JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental) JEP 230: Microbenchmark Suite JEP 325: Switch Expressions (Preview) JEP 334: JVM Constants API JEP 340: One AArch64 Port, Not Two JEP 341: Default CDS Archives JEP 344: Abortable Mixed Collections for G1 JEP 346: Promptly Return Unused Committed Memory from G1 Switch expressions!
  • 61. 61 private boolean isWeekDay(DayOfWeek day) { boolean weekDay; switch(day) { case MONDAY: case TUESDAY: case WEDNESDAY: case THURSDAY: case FRIDAY: weekDay = true; break; case SATURDAY: case SUNDAY: weekDay = false; default: throw new IllegalStateException("A new day was added in my week: " + day); } return weekDay; } Switch expressions
  • 62. 62 private boolean isWeekDay(DayOfWeek day) { boolean weekDay; switch(day) { case MONDAY: case TUESDAY: case WEDNESDAY: case THURSDAY: case FRIDAY: weekDay = true; break; case SATURDAY: case SUNDAY: weekDay = false; break; default: throw new IllegalStateException("A new day was added in my week: " + day); } return weekDay; } Switch expressions
  • 63. 63 private boolean isWeekDay(DayOfWeek day) { boolean weekDay; switch(day) { case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> weekDay = true; case SATURDAY, SUNDAY -> weekDay = false; default -> throw new IllegalStateException("A new day was added in my week: " + day); } return weekDay; } Switch expressions
  • 64. 64 private boolean isWeekDay(DayOfWeek day) { boolean weekDay = switch(day) { case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> true; case SATURDAY, SUNDAY -> false; default -> throw new IllegalStateException("A new day was added in my week: " + day); }; return weekDay; } Switch expressions
  • 65. 65 private boolean isWeekDay(DayOfWeek day) { return switch(day) { case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> true; case SATURDAY, SUNDAY -> false; default -> throw new IllegalStateException("A new day was added in my week: " + day); }; } Switch expressions
  • 67. 67 JEP 350: Dynamic CDS Archives JEP 351: ZGC: Uncommit Unused Memory JEP 353: Reimplement the Legacy Socket API JEP 354: Switch Expressions (Preview) JEP 355: Text Blocks (Preview) Text Block!
  • 68. 68 private boolean isWeekDay(DayOfWeek day) { return switch(day) { case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> true; case SATURDAY, SUNDAY -> false; default -> { if(onEarth) { yield false; } yield true; } }; } Switch expressions (still a preview)
  • 69. 69 String script = """ function hello() { print('"Hello, world"'); } hello(); """; Text Block (JEP 355)
  • 71. 71 JEP 305: Pattern Matching for instanceof (Preview) JEP 343: Packaging Tool (Incubator) JEP 345: NUMA-Aware Memory Allocation for G1 JEP 349: JFR Event Streaming JEP 352: Non-Volatile Mapped Byte Buffers JEP 358: Helpful NullPointerExceptions JEP 359: Records (Preview) JEP 361: Switch Expressions (Standard) JEP 362: Deprecate the Solaris and SPARC Ports JEP 363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector JEP 364: ZGC on macOS JEP 365: ZGC on Windows JEP 366: Deprecate the ParallelScavenge + SerialOld GC Combination JEP 367: Remove the Pack200 Tools and API JEP 368: Text Blocks (Second Preview) JEP 370: Foreign-Memory Access API (Incubator) Big one
  • 78. 78 Nothing to see yet Boring
  • 81. 81 Java Champions – Java is still free https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244 Adopt OpenJDK https://adoptopenjdk.net/ Maurice Naftalin’s Lambda FAQ http://www.lambdafaq.org/ Zeroturnaround Module Cheat Sheet http://files.zeroturnaround.com/pdf/RebelLabs-Java-9-modules-cheat-sheet.pdf Var styleguide http://openjdk.java.net/projects/amber/LVTIstyle.html Heinz Kabutz’s online course https://javaspecialists.teachable.com/courses Links
  • 82. 82 Modern Java in Action Raoul-Gabriel Urma and Mario Fusco Mastering Lambdas Maurice Naftalin Java 9 Modularity Sander Mak and Paul Bakker Core Java Cay S. Horstmann Books