SlideShare una empresa de Scribd logo
1 de 42
Descargar para leer sin conexión
Java 8
Good & Bad
Overview by Nicola Pedot - 26 giugno 2014
https://creativecommons.org/licenses/by/3.0/it
Status
On 2014, Java is one of the most used programming
language for client-server applications, with approximately
9 million developers.
Oracle Java Versions:
6 archived
7 production ready (java.net)
8 for developers (java.com)
Corporate Support
IBM
Oracle
Red Hat
Google
Java 8 Parts
Process
Development Kit- JDK
Virtual Machine VM
Language
Runtime Libraries - JRE
Editions - JEE, JSE, JME, JEmbedded
Java Community Process
The JCP remains the governing body for all standard Java
SE APIs and related interfaces. If a proposal accepted into
this process intends to revise existing standard interfaces,
or to define new ones, then a parallel effort to design,
review, and approve those changes must be undertaken in
the JCP, either as part of a Maintenance Review of an
existing JSR or in the context of a new JSR.
JDK Enhancement-Proposal
JEP 1: JDK Enhancement-Proposal & Roadmap Process
Author Mark Reinhold
Organization Oracle
Created 2011/6/23
Updated 2012/12/4
The primary goal of this process is to produce a regularly-updated list of
proposals to serve as the long-term Roadmap for JDK Release Projects and related
efforts.
This process is open to every OpenJDK Committer.
This process does not in any way supplant the Java Community Process.
Java JDK - OpenJDK
JDK 8 was the second part of "Plan B". The single driving
feature of the release was Project Lambda. (Project Jigsaw
was initially proposed for this release but later dropped).
Additional features proposed via the JEP Process were
included so long as they fit into the overall schedule
required for Lambda. Detailed information on the features
included in the release can be found on the features page.
The source is open and avaliable on Mercurial
repository.
Java VM - HotSpot
Below you will find the source code for the Java HotSpot virtual
machine, the best Java virtual machine on the planet.
The HotSpot code base has been worked on by dozens of people,
over the course of 10 years, so far. (That's good and bad.) It's
big. There are nearly 1500 C/C++ header and source files,
comprising almost 250,000 lines of code. In addition to the
expected class loader, bytecode interpreter, and supporting
runtime routines, you get two runtime compilers from bytecode to
native instructions, 3 (or so) garbage collectors, and a set of
high-performance runtime libraries for synchronization, etc.
Java 8 Hot Topics
Default Methods
Function Iterfaces (Closure, Lambda) or AntiScala
Streams
Parallel
Javascript Nashorn
Java Time
SNI IPV6
Security
Default methods
Default methods enable you to add new
functionality to the interfaces of your libraries
and ensure binary compatibility with code
written for older versions of those interfaces.
Note: interfaces do not have any state
Default method syntax
public interface oldInterface {
public void existingMethod();
default public void newDefaultMethod() {
System.out.println("New default method"
" is added in interface");
}
}
The following class will compile successfully in Java JDK 8,?
public class oldInterfaceImpl implements oldInterface {
public void existingMethod() {
// existing implementation is here…
}
}
If you create an instance of oldInterfaceImpl:?
oldInterfaceImpl obj = new oldInterfaceImpl ();
// print “New default method add in interface”
obj.newDefaultMethod();
Default method conflict
java: class Impl inherits unrelated defaults for defaultMethod() from types InterfaceA and InterfaceB
In order to fix this class, we need to provide default method implementation:
public class Impl implements InterfaceA, InterfaceB {
public void defaultMethod(){
// existing code here..
InterfaceA.super.defaultMethod();
}
}
Default method good
The great thing about using interfaces instead
of adapter classes is the ability to extend
another class than the particular adapter.
Simil multiple inheritance.
Finally, library developers are able to evolve
established APIs without introducing
incompatibilities to their user's code.
Default method bad
In a nutshell, make sure to never override a default
method in another interface. Neither with another
default method, nor with an abstract method.
Before Java 7, you would only need to look for the
actually invoked code by traversing down a linear
class hierarchy. Only add this complexity when you
really feel it is absolutely necessary.
Lambda: functional interface
A functional interface is any interface that
contains only one abstract method. (A
functional interface may contain one or more
default methods or static methods.)
Lambda syntax
//Prima:
List list1 = Arrays.asList(1,2,3,5);
for(Integer n: list1) {
System.out.println(n);
}
//Dopo:
List list2 = Arrays.asList(1,2,3,5);
list2.forEach(n -> System.out.println(n));// default method forEach
//Espressioni lambda e doppio due punti static method reference
list2.forEach(System.out::println);
Lambda syntax (2)
// Anonymous class
new CheckPerson() {
public boolean test(Person p) {
return p.getGender() == Person.Sex.MALE
&& p.getAge() >= 18
&& p.getAge() <= 25;
}
}
// Lambda
(Person p) -> p.getGender() == Person.Sex.MALE
&& p.getAge() >= 18
&& p.getAge() <= 25
Good: Stream sample
Map<Person.Sex, List<Person>> byGender =
roster.stream().collect(
Collectors.groupingBy(Person::getGender));
Good: Parallel Stream sample
ConcurrentMap<Person.Sex, List<Person>> byGender =
roster.parallelStream().collect(
Collectors.groupingByConcurrent(Person::getGender))
Stream Bad Parts
“Java 8 Streams API will be the single biggest source of
new Stack Overflow questions.”
With streams and functional thinking, we’ll run into a
massive amount of new, subtle bugs. Few of these bugs
can be prevented, except through practice and staying
focused. You have to think about how to order your
operations. You have to think about whether your streams
may be infinite. [14]
Stream Bad Parts (2)
“If evaluation of one parallel stream results in a very long running
task, this may be split into as many long running sub-tasks that
will be distributed to each thread in the pool. From there, no
other parallel stream can be processed because all threads will
be occupied.”
If a program is to be run inside a container, one must be very
careful when using parallel streams. Never use the default pool
in such a situation unless you know for sure that the container
can handle it. In a Java EE container, do not use parallel
streams. [15]
Parallel Lang Tools: StampedLock
The ReentrantReadWriteLock had a lot of shortcomings: It
suffered from starvation. You could not upgrade a read lock
into a write lock. There was no support for optimistic reads.
Programmers "in the know" mostly avoided using them.
StampedLock addresses all these shortcomings
Parallel Lang Tools:Concurrent Adders
Concurrent Adders:
this is a new set of classes for managing counters written
and read by multiple threads. The new API promises
significant performance gains, while still keeping things
simple and straightforward.
Bad Part
We’re paying the price for shorter, more
concise code with more complex debugging,
and longer synthetic call stacks.
The Reason
The reason is that while javac has been
extended to support Lambda functions, the
JVM still remains oblivious to them.
Javascript
Un nome per tutti: node.jar from Oracle
JavaScript from Java
package sample1;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class Hello {
public static void main(String... args) throws Throwable {
ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
engine.eval("function sum(a, b) { return a + b; }");
System.out.println(engine.eval("sum(1, 2);"));
engine.eval(new FileReader("src/sample1/greeter.js"));
System.out.println(invocable.invokeFunction("greet", "Julien"));
}
}
JavaScript DB Connection
var someDatabaseFun = function() {
var Properties = Java.type("java.util.Properties");
var Driver = Java.type("org.h2.Driver");
var driver = new Driver();
var properties = new Properties();
properties.setProperty("user", "sa");
properties.setProperty("password", "");
try {
var conn = driver.connect(
"jdbc:h2:~/test", properties);
// Database code here
}
finally {
try {
if (conn) conn.close();
} catch (e) {}
}
}
someDatabaseFun();
JavaScript with JOOQ
DSL.using(conn)
.select(
t.TABLE_SCHEMA,
t.TABLE_NAME,
count().as("CNT"))
.from(t)
.join(c)
.on(row(t.TABLE_SCHEMA, t.TABLE_NAME)
.eq(c.TABLE_SCHEMA, c.TABLE_NAME))
.groupBy(t.TABLE_SCHEMA, t.TABLE_NAME)
.orderBy(
t.TABLE_SCHEMA.asc(),
t.TABLE_NAME.asc())
// continue in next slide
JavaScript with stream
DSL.using(conn)
.select(...) // this is folded code.
// This fetches a List<Map<String, Object>> as
// your ResultSet representation
.fetchMaps()
// This is Java 8's standard Collection.stream()
.stream()
// And now, r is like any other JavaScript object
// or record!
.forEach(function (r) {
print(r.TABLE_SCHEMA + '.'
+ r.TABLE_NAME + ' has '
+ r.CNT + ' columns.');
});
Javascript Problem
In this case the bytecode code is dynamically
generated at runtime using a nested tree of
Lambda expressions. There is very little
correlation between our source code, and the
resulting bytecode executed by the JVM. The
call stack is now two orders of magnitude
longer.
The Hard Side
Haskell is good at preventing bugs.
Java without lambda has readable stacktrace.
In Groovy is harder reading exceptions,
Java8 Lambda is also harder,
Javascript is even harder.
JavaTime, JodaTime’s revenge
● The Calendar class was not type safe.
● Because the classes were mutable, they could not be
used in multithreaded applications.
● Bugs in application code were common due to the
unusual numbering of months and the lack of type
safety.
JodaTime syntax
import java.time.Instant;
Instant timestamp = Instant.now();
This class format follows the ISO-8601
2013-05-30T23:38:23.085Z
Come gestire le vecchie date?
Date.toInstant()
public static Date from(Instant instant)
Calendar.toInstant()
Other classes Clock, Period,...
SNI IPV6
Assigning a separate IP address for each site increases the cost of hosting since requests for IP addresses must be justified to the
regional internet registry and IPv4 addresses are now in short supply.
An extension to TLS called Server Name Indication (SNI) addresses this issue by sending the name of the virtual domain as part
of the TLS negotiation. <<Wikipedia>>
E’ possibile configurare in un webserver più
virtual host con diversi certificati SSL
utilizzando un solo indirizzo IP.
provocazione...in vista dell’esaurimento di IP di
InternetOfThings…. Java Everywhere?
Security
java.security.SecureRandom
This class provides a cryptographically strong random
number generator (RNG).
Others...
1. Process termination
Process destroyForcibly(); isAlive(); waitFor(long timeout, TimeUnit unit);
2. Optional Values
String name = computer.flatMap(Computer::getSoundcard)
.flatMap(Soundcard::getUSB)
.map(USB::getVersion)
.orElse("UNKNOWN");
3. Annotate Anything
Type Annotations are annotations that can be placed anywhere you use a type. This includes the new operator, type casts,
implements clauses and throws clauses
Others… (2)
4. Directory Walking
Interface DirectoryStream<T> extends Iterator
default void forEach(Consumer<? super T> action)
default Spliterator<T> spliterator()
New Domains
Java started simple by design, now it has to
gain complexity to model new domains.
from Static Object Orienteed to
->(functional) Parallel Event Orienteed
->(dynamic) Syntax & Check relaxed
== More fun & more dangerous times ahead!
from Java8 to Java9
from….
Enterprise Edition
Standard Edition
Embedded Edition
Mobile Edition
…. to Java9 complete module system
Compact Profiles
Java Compact Profiles,
A reasonably configured Java SE-Embedded 8 for ARMv5/Linux
compact1 profile comes in at less than 14MB
compact2 is about 18MB and
compact3 is in the neighborhood of 21MB.
For reference, the Java SE-Embedded 7u21 Linux environment requires 45MB.
Links
1. http://www.dzone.com/links/r/the_bad_parts_of_lambdas_in_java_8.html
2. http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
3. http://www.javacodegeeks.com/2014/04/15-must-read-java-8-tutorials.html
4. http://www.oracle.com/events/us/en/java8/index.html?msgid=3-9911533944
5. http://typesafe.com/blog/reactive-programming-patterns-in-akka-using-java-8
6. http://java.dzone.com/articles/java-8-will-revolutionize
7. http://openjdk.java.net/jeps/117
8. http://hg.openjdk.java.net/jdk8
9. http://it.wikipedia.org/wiki/Java_%28linguaggio_di_programmazione%29
10. http://java.dzone.com/articles/5-features-java-8-will-change
11. http://java.dzone.com/articles/10-features-java-8-you-havent
12. http://java.dzone.com/articles/java-lambda-expressions-vs
13. http://java.dzone.com/articles/java-8-default-methods-can
14. http://blog.informatech.cr/2013/03/11/java-infinite-streams/
15. http://java.dzone.com/articles/whats-wrong-java-8-part-iii

Más contenido relacionado

La actualidad más candente

Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov Nayden Gochev
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)slire
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12FarjanaAhmed3
 
Tech_Implementation of Complex ITIM Workflows
Tech_Implementation of Complex ITIM WorkflowsTech_Implementation of Complex ITIM Workflows
Tech_Implementation of Complex ITIM Workflows51 lecture
 
Software Uni Conf October 2014
Software Uni Conf October 2014Software Uni Conf October 2014
Software Uni Conf October 2014Nayden Gochev
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeOmar Bashir
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machineLaxman Puri
 
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)DevelopIntelligence
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringNayden Gochev
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8javafxpert
 
Advanced java programming-contents
Advanced java programming-contentsAdvanced java programming-contents
Advanced java programming-contentsSelf-Employed
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8Simon Ritter
 
The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8Takipi
 
Java Code Generation for Productivity
Java Code Generation for ProductivityJava Code Generation for Productivity
Java Code Generation for ProductivityDavid Noble
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java Abdelmonaim Remani
 

La actualidad más candente (20)

Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12
 
Tech_Implementation of Complex ITIM Workflows
Tech_Implementation of Complex ITIM WorkflowsTech_Implementation of Complex ITIM Workflows
Tech_Implementation of Complex ITIM Workflows
 
Software Uni Conf October 2014
Software Uni Conf October 2014Software Uni Conf October 2014
Software Uni Conf October 2014
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and Runtime
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machine
 
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with Spring
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
 
Advanced java programming-contents
Advanced java programming-contentsAdvanced java programming-contents
Advanced java programming-contents
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 
Java 7 & 8
Java 7 & 8Java 7 & 8
Java 7 & 8
 
Complete Java Course
Complete Java CourseComplete Java Course
Complete Java Course
 
The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8
 
Java Code Generation for Productivity
Java Code Generation for ProductivityJava Code Generation for Productivity
Java Code Generation for Productivity
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 

Destacado

BDD & design paradoxes appunti devoxx2012
BDD & design paradoxes   appunti devoxx2012BDD & design paradoxes   appunti devoxx2012
BDD & design paradoxes appunti devoxx2012Nicola Pedot
 
BDD in DDD
BDD in DDDBDD in DDD
BDD in DDDoehsani
 
Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.
Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.
Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.Open Campus Tiscali
 
Sviluppare software a colpi di test. Introduzione al BDD
Sviluppare software a colpi di test. Introduzione al BDDSviluppare software a colpi di test. Introduzione al BDD
Sviluppare software a colpi di test. Introduzione al BDDOpen Campus Tiscali
 
Behaviour Driven Development - Tutta questione di comunicazione
Behaviour Driven Development - Tutta questione di comunicazioneBehaviour Driven Development - Tutta questione di comunicazione
Behaviour Driven Development - Tutta questione di comunicazioneCodemotion
 

Destacado (9)

BDD & design paradoxes appunti devoxx2012
BDD & design paradoxes   appunti devoxx2012BDD & design paradoxes   appunti devoxx2012
BDD & design paradoxes appunti devoxx2012
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
 
The BDD live show (ITA)
The BDD live show (ITA)The BDD live show (ITA)
The BDD live show (ITA)
 
BDD in DDD
BDD in DDDBDD in DDD
BDD in DDD
 
Bdd
BddBdd
Bdd
 
Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.
Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.
Sviluppare software a colpi di test – II appuntamento: “mani in pasta col BDD.
 
Sviluppare software a colpi di test. Introduzione al BDD
Sviluppare software a colpi di test. Introduzione al BDDSviluppare software a colpi di test. Introduzione al BDD
Sviluppare software a colpi di test. Introduzione al BDD
 
Behaviour Driven Development - Tutta questione di comunicazione
Behaviour Driven Development - Tutta questione di comunicazioneBehaviour Driven Development - Tutta questione di comunicazione
Behaviour Driven Development - Tutta questione di comunicazione
 
dalTDDalBDD
dalTDDalBDDdalTDDalBDD
dalTDDalBDD
 

Similar a Java 8 Overview

Introduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and StreamsIntroduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and StreamsEmiel Paasschens
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
 
New Features of JAVA SE8
New Features of JAVA SE8New Features of JAVA SE8
New Features of JAVA SE8Dinesh Pathak
 
Java/Servlet/JSP/JDBC
Java/Servlet/JSP/JDBCJava/Servlet/JSP/JDBC
Java/Servlet/JSP/JDBCFAKHRUN NISHA
 
Java 9 features
Java 9 featuresJava 9 features
Java 9 featuresshrinath97
 
Features java9
Features java9Features java9
Features java9srmohan06
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESOBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESsuthi
 
Java2 platform
Java2 platformJava2 platform
Java2 platformSajan Sahu
 
imperative programming language, java, android
imperative programming language, java, androidimperative programming language, java, android
imperative programming language, java, androidi i
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynoteSuyash Joshi
 

Similar a Java 8 Overview (20)

Java basic
Java basicJava basic
Java basic
 
Introduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and StreamsIntroduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and Streams
 
Colloquium Report
Colloquium ReportColloquium Report
Colloquium Report
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
Basic java part_ii
Basic java part_iiBasic java part_ii
Basic java part_ii
 
java new technology
java new technologyjava new technology
java new technology
 
New Features of JAVA SE8
New Features of JAVA SE8New Features of JAVA SE8
New Features of JAVA SE8
 
Java/Servlet/JSP/JDBC
Java/Servlet/JSP/JDBCJava/Servlet/JSP/JDBC
Java/Servlet/JSP/JDBC
 
Java 9 features
Java 9 featuresJava 9 features
Java 9 features
 
Java1
Java1Java1
Java1
 
Java
Java Java
Java
 
Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
Features java9
Features java9Features java9
Features java9
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Java 8
Java 8Java 8
Java 8
 
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESOBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
 
Java2 platform
Java2 platformJava2 platform
Java2 platform
 
imperative programming language, java, android
imperative programming language, java, androidimperative programming language, java, android
imperative programming language, java, android
 
Java dev mar_2021_keynote
Java dev mar_2021_keynoteJava dev mar_2021_keynote
Java dev mar_2021_keynote
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 

Más de Nicola Pedot

AI, ML e l'anello mancante
AI, ML e l'anello mancanteAI, ML e l'anello mancante
AI, ML e l'anello mancanteNicola Pedot
 
Say No To Dependency Hell
Say No To Dependency Hell Say No To Dependency Hell
Say No To Dependency Hell Nicola Pedot
 
Java al servizio della data science - Java developers' meeting
Java al servizio della data science - Java developers' meetingJava al servizio della data science - Java developers' meeting
Java al servizio della data science - Java developers' meetingNicola Pedot
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's NewNicola Pedot
 
Tom EE appunti devoxx2012
Tom EE   appunti devoxx2012 Tom EE   appunti devoxx2012
Tom EE appunti devoxx2012 Nicola Pedot
 
Presentazione+Android
Presentazione+AndroidPresentazione+Android
Presentazione+AndroidNicola Pedot
 

Más de Nicola Pedot (11)

AI, ML e l'anello mancante
AI, ML e l'anello mancanteAI, ML e l'anello mancante
AI, ML e l'anello mancante
 
Ethic clean
Ethic cleanEthic clean
Ethic clean
 
Say No To Dependency Hell
Say No To Dependency Hell Say No To Dependency Hell
Say No To Dependency Hell
 
Java al servizio della data science - Java developers' meeting
Java al servizio della data science - Java developers' meetingJava al servizio della data science - Java developers' meeting
Java al servizio della data science - Java developers' meeting
 
Jakarta EE 2018
Jakarta EE 2018Jakarta EE 2018
Jakarta EE 2018
 
Lazy Java
Lazy JavaLazy Java
Lazy Java
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
 
Tom EE appunti devoxx2012
Tom EE   appunti devoxx2012 Tom EE   appunti devoxx2012
Tom EE appunti devoxx2012
 
Eclipse Svn
Eclipse SvnEclipse Svn
Eclipse Svn
 
Eclipse
EclipseEclipse
Eclipse
 
Presentazione+Android
Presentazione+AndroidPresentazione+Android
Presentazione+Android
 

Último

How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 

Último (20)

How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

Java 8 Overview

  • 1. Java 8 Good & Bad Overview by Nicola Pedot - 26 giugno 2014 https://creativecommons.org/licenses/by/3.0/it
  • 2. Status On 2014, Java is one of the most used programming language for client-server applications, with approximately 9 million developers. Oracle Java Versions: 6 archived 7 production ready (java.net) 8 for developers (java.com)
  • 4. Java 8 Parts Process Development Kit- JDK Virtual Machine VM Language Runtime Libraries - JRE Editions - JEE, JSE, JME, JEmbedded
  • 5. Java Community Process The JCP remains the governing body for all standard Java SE APIs and related interfaces. If a proposal accepted into this process intends to revise existing standard interfaces, or to define new ones, then a parallel effort to design, review, and approve those changes must be undertaken in the JCP, either as part of a Maintenance Review of an existing JSR or in the context of a new JSR.
  • 6. JDK Enhancement-Proposal JEP 1: JDK Enhancement-Proposal & Roadmap Process Author Mark Reinhold Organization Oracle Created 2011/6/23 Updated 2012/12/4 The primary goal of this process is to produce a regularly-updated list of proposals to serve as the long-term Roadmap for JDK Release Projects and related efforts. This process is open to every OpenJDK Committer. This process does not in any way supplant the Java Community Process.
  • 7. Java JDK - OpenJDK JDK 8 was the second part of "Plan B". The single driving feature of the release was Project Lambda. (Project Jigsaw was initially proposed for this release but later dropped). Additional features proposed via the JEP Process were included so long as they fit into the overall schedule required for Lambda. Detailed information on the features included in the release can be found on the features page. The source is open and avaliable on Mercurial repository.
  • 8. Java VM - HotSpot Below you will find the source code for the Java HotSpot virtual machine, the best Java virtual machine on the planet. The HotSpot code base has been worked on by dozens of people, over the course of 10 years, so far. (That's good and bad.) It's big. There are nearly 1500 C/C++ header and source files, comprising almost 250,000 lines of code. In addition to the expected class loader, bytecode interpreter, and supporting runtime routines, you get two runtime compilers from bytecode to native instructions, 3 (or so) garbage collectors, and a set of high-performance runtime libraries for synchronization, etc.
  • 9. Java 8 Hot Topics Default Methods Function Iterfaces (Closure, Lambda) or AntiScala Streams Parallel Javascript Nashorn Java Time SNI IPV6 Security
  • 10. Default methods Default methods enable you to add new functionality to the interfaces of your libraries and ensure binary compatibility with code written for older versions of those interfaces. Note: interfaces do not have any state
  • 11. Default method syntax public interface oldInterface { public void existingMethod(); default public void newDefaultMethod() { System.out.println("New default method" " is added in interface"); } } The following class will compile successfully in Java JDK 8,? public class oldInterfaceImpl implements oldInterface { public void existingMethod() { // existing implementation is here… } } If you create an instance of oldInterfaceImpl:? oldInterfaceImpl obj = new oldInterfaceImpl (); // print “New default method add in interface” obj.newDefaultMethod();
  • 12. Default method conflict java: class Impl inherits unrelated defaults for defaultMethod() from types InterfaceA and InterfaceB In order to fix this class, we need to provide default method implementation: public class Impl implements InterfaceA, InterfaceB { public void defaultMethod(){ // existing code here.. InterfaceA.super.defaultMethod(); } }
  • 13. Default method good The great thing about using interfaces instead of adapter classes is the ability to extend another class than the particular adapter. Simil multiple inheritance. Finally, library developers are able to evolve established APIs without introducing incompatibilities to their user's code.
  • 14. Default method bad In a nutshell, make sure to never override a default method in another interface. Neither with another default method, nor with an abstract method. Before Java 7, you would only need to look for the actually invoked code by traversing down a linear class hierarchy. Only add this complexity when you really feel it is absolutely necessary.
  • 15. Lambda: functional interface A functional interface is any interface that contains only one abstract method. (A functional interface may contain one or more default methods or static methods.)
  • 16. Lambda syntax //Prima: List list1 = Arrays.asList(1,2,3,5); for(Integer n: list1) { System.out.println(n); } //Dopo: List list2 = Arrays.asList(1,2,3,5); list2.forEach(n -> System.out.println(n));// default method forEach //Espressioni lambda e doppio due punti static method reference list2.forEach(System.out::println);
  • 17. Lambda syntax (2) // Anonymous class new CheckPerson() { public boolean test(Person p) { return p.getGender() == Person.Sex.MALE && p.getAge() >= 18 && p.getAge() <= 25; } } // Lambda (Person p) -> p.getGender() == Person.Sex.MALE && p.getAge() >= 18 && p.getAge() <= 25
  • 18. Good: Stream sample Map<Person.Sex, List<Person>> byGender = roster.stream().collect( Collectors.groupingBy(Person::getGender));
  • 19. Good: Parallel Stream sample ConcurrentMap<Person.Sex, List<Person>> byGender = roster.parallelStream().collect( Collectors.groupingByConcurrent(Person::getGender))
  • 20. Stream Bad Parts “Java 8 Streams API will be the single biggest source of new Stack Overflow questions.” With streams and functional thinking, we’ll run into a massive amount of new, subtle bugs. Few of these bugs can be prevented, except through practice and staying focused. You have to think about how to order your operations. You have to think about whether your streams may be infinite. [14]
  • 21. Stream Bad Parts (2) “If evaluation of one parallel stream results in a very long running task, this may be split into as many long running sub-tasks that will be distributed to each thread in the pool. From there, no other parallel stream can be processed because all threads will be occupied.” If a program is to be run inside a container, one must be very careful when using parallel streams. Never use the default pool in such a situation unless you know for sure that the container can handle it. In a Java EE container, do not use parallel streams. [15]
  • 22. Parallel Lang Tools: StampedLock The ReentrantReadWriteLock had a lot of shortcomings: It suffered from starvation. You could not upgrade a read lock into a write lock. There was no support for optimistic reads. Programmers "in the know" mostly avoided using them. StampedLock addresses all these shortcomings
  • 23. Parallel Lang Tools:Concurrent Adders Concurrent Adders: this is a new set of classes for managing counters written and read by multiple threads. The new API promises significant performance gains, while still keeping things simple and straightforward.
  • 24. Bad Part We’re paying the price for shorter, more concise code with more complex debugging, and longer synthetic call stacks.
  • 25. The Reason The reason is that while javac has been extended to support Lambda functions, the JVM still remains oblivious to them.
  • 26. Javascript Un nome per tutti: node.jar from Oracle
  • 27. JavaScript from Java package sample1; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; public class Hello { public static void main(String... args) throws Throwable { ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn"); engine.eval("function sum(a, b) { return a + b; }"); System.out.println(engine.eval("sum(1, 2);")); engine.eval(new FileReader("src/sample1/greeter.js")); System.out.println(invocable.invokeFunction("greet", "Julien")); } }
  • 28. JavaScript DB Connection var someDatabaseFun = function() { var Properties = Java.type("java.util.Properties"); var Driver = Java.type("org.h2.Driver"); var driver = new Driver(); var properties = new Properties(); properties.setProperty("user", "sa"); properties.setProperty("password", ""); try { var conn = driver.connect( "jdbc:h2:~/test", properties); // Database code here } finally { try { if (conn) conn.close(); } catch (e) {} } } someDatabaseFun();
  • 29. JavaScript with JOOQ DSL.using(conn) .select( t.TABLE_SCHEMA, t.TABLE_NAME, count().as("CNT")) .from(t) .join(c) .on(row(t.TABLE_SCHEMA, t.TABLE_NAME) .eq(c.TABLE_SCHEMA, c.TABLE_NAME)) .groupBy(t.TABLE_SCHEMA, t.TABLE_NAME) .orderBy( t.TABLE_SCHEMA.asc(), t.TABLE_NAME.asc()) // continue in next slide
  • 30. JavaScript with stream DSL.using(conn) .select(...) // this is folded code. // This fetches a List<Map<String, Object>> as // your ResultSet representation .fetchMaps() // This is Java 8's standard Collection.stream() .stream() // And now, r is like any other JavaScript object // or record! .forEach(function (r) { print(r.TABLE_SCHEMA + '.' + r.TABLE_NAME + ' has ' + r.CNT + ' columns.'); });
  • 31. Javascript Problem In this case the bytecode code is dynamically generated at runtime using a nested tree of Lambda expressions. There is very little correlation between our source code, and the resulting bytecode executed by the JVM. The call stack is now two orders of magnitude longer.
  • 32. The Hard Side Haskell is good at preventing bugs. Java without lambda has readable stacktrace. In Groovy is harder reading exceptions, Java8 Lambda is also harder, Javascript is even harder.
  • 33. JavaTime, JodaTime’s revenge ● The Calendar class was not type safe. ● Because the classes were mutable, they could not be used in multithreaded applications. ● Bugs in application code were common due to the unusual numbering of months and the lack of type safety.
  • 34. JodaTime syntax import java.time.Instant; Instant timestamp = Instant.now(); This class format follows the ISO-8601 2013-05-30T23:38:23.085Z Come gestire le vecchie date? Date.toInstant() public static Date from(Instant instant) Calendar.toInstant() Other classes Clock, Period,...
  • 35. SNI IPV6 Assigning a separate IP address for each site increases the cost of hosting since requests for IP addresses must be justified to the regional internet registry and IPv4 addresses are now in short supply. An extension to TLS called Server Name Indication (SNI) addresses this issue by sending the name of the virtual domain as part of the TLS negotiation. <<Wikipedia>> E’ possibile configurare in un webserver più virtual host con diversi certificati SSL utilizzando un solo indirizzo IP. provocazione...in vista dell’esaurimento di IP di InternetOfThings…. Java Everywhere?
  • 36. Security java.security.SecureRandom This class provides a cryptographically strong random number generator (RNG).
  • 37. Others... 1. Process termination Process destroyForcibly(); isAlive(); waitFor(long timeout, TimeUnit unit); 2. Optional Values String name = computer.flatMap(Computer::getSoundcard) .flatMap(Soundcard::getUSB) .map(USB::getVersion) .orElse("UNKNOWN"); 3. Annotate Anything Type Annotations are annotations that can be placed anywhere you use a type. This includes the new operator, type casts, implements clauses and throws clauses
  • 38. Others… (2) 4. Directory Walking Interface DirectoryStream<T> extends Iterator default void forEach(Consumer<? super T> action) default Spliterator<T> spliterator()
  • 39. New Domains Java started simple by design, now it has to gain complexity to model new domains. from Static Object Orienteed to ->(functional) Parallel Event Orienteed ->(dynamic) Syntax & Check relaxed == More fun & more dangerous times ahead!
  • 40. from Java8 to Java9 from…. Enterprise Edition Standard Edition Embedded Edition Mobile Edition …. to Java9 complete module system
  • 41. Compact Profiles Java Compact Profiles, A reasonably configured Java SE-Embedded 8 for ARMv5/Linux compact1 profile comes in at less than 14MB compact2 is about 18MB and compact3 is in the neighborhood of 21MB. For reference, the Java SE-Embedded 7u21 Linux environment requires 45MB.
  • 42. Links 1. http://www.dzone.com/links/r/the_bad_parts_of_lambdas_in_java_8.html 2. http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html 3. http://www.javacodegeeks.com/2014/04/15-must-read-java-8-tutorials.html 4. http://www.oracle.com/events/us/en/java8/index.html?msgid=3-9911533944 5. http://typesafe.com/blog/reactive-programming-patterns-in-akka-using-java-8 6. http://java.dzone.com/articles/java-8-will-revolutionize 7. http://openjdk.java.net/jeps/117 8. http://hg.openjdk.java.net/jdk8 9. http://it.wikipedia.org/wiki/Java_%28linguaggio_di_programmazione%29 10. http://java.dzone.com/articles/5-features-java-8-will-change 11. http://java.dzone.com/articles/10-features-java-8-you-havent 12. http://java.dzone.com/articles/java-lambda-expressions-vs 13. http://java.dzone.com/articles/java-8-default-methods-can 14. http://blog.informatech.cr/2013/03/11/java-infinite-streams/ 15. http://java.dzone.com/articles/whats-wrong-java-8-part-iii