Upload
abdenour-bouateli
View
137
Download
1
Embed Size (px)
Citation preview
JAV
A8
, cré
er v
otr
e fu
ture
• Caractéristiques– 50% de réduction de votre code projet
– 18% gain en productivité
– 25% gain en performance
• Lambda Expressions– Basic lambda
• (Type1 var1, Type2 var2 …) -> { method body }
– Lambda with type inferencing• (var1, var2 …) -> { method body }
• Syntaxe:
• Exemple
• Caractéristiques:
– 110% de puissance
– 12% de flexibilité
– 10% de simplification
• Nouvelle API Stream java.util.stream:– <R> Stream<R> map(Function<? super T,? extends R> mapper)
– Stream<T> filter(Predicate<? super T> predicate)
– Stream<T> sorted(Comparator<? super T> comparator)
• Setter
• Getter
• Agrégation
• In its simplest form, an annotation looks like the following:
– @Entity
• Exemple
• Annotation Types Used by the Java Language(java.lang):
– @Deprecated @Deprecated
– @Override @Override
– @SuppressWarnings @SuppressWarnings
– @SafeVarargs @SafeVarargs
– @FunctionalInterface @FunctionalInterface
• Annotations That Apply to Other Annotations (java.lang.annotation):
– @Retention @Retention annotation
– @Documented @Documented
– @Target @Target annotation
– @Inherited @Inherited annotation
– @Repeatable @Repeatable annotation
• Cette nouvelle API est basée sur deux différents modèles de conception du temps:– Le temps Machine – et le temps Humain.
• Exemple:– Pour une machine, le temps n'est qu'un entier
augmentant depuis l'epoque (01 janvier 1970 00h00min00s0ms0ns).
– Pour un humain en revanche, il s'agit d'une succession de champs ayant une unité (année, mois, jours, heure, etc.).
• Le temps Machine
– java.time.Instant
– java.time.Duration
• Exemples• java.time.Instant
• Exemples
– java.time.Duration
• Le temps Humain
– java.time.LocalDate,
– java.time.LocalTime
– java.time.LocalDateTime
• Exemple:
– java.time.LocalDate
• Exemple:
– java.time.LocalTime
– java.time.LocalDateTime
• Caractéristiques
– 135% de puissance
• Liste
• Caractéristiques:
– 150% de puissance
• Du JavaScript en ligne de commande
– jjs en ligne de commande (<chemin_jdk>/bin/) :
– jjs permet d’exécuter des fichiers .js
• Exemple
• Caractéristiques:
– 12% de flexibilité
– 200% de puissance
• PermSize
– Les arguments JVM PermSize et MaxPermSizesont ignorés.
• JDK 1.8 @64-bit – Metaspace dynamic re-size
– Java program with 50K configured iterations
– Java heap space of 1024 MB
– Java Metaspace space: unbounded (default)
• Suite…
• JDK 1.8 @64-bit – Metaspace depletion
– Java program with 50K configured iterations
– Java heap space of 1024 MB
– Java Metaspace space: 128 MB (-XX:MaxMetaspaceSize=128m)