SlideShare a Scribd company logo
1 of 27
Download to read offline
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1
J a v a O n e 2 0 1 3
2 2 – 2 6 s e p t e m b e r , S a n
F r a n c is c o
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2
A g e n d a
W e lk o m
• J a v a O n e
• J a v a S E 8
• J a v a E E 7
• H ig h lig h t s
– B lin g ID E
– E r r a i
– R x J a v a
– U n it T e s t in g
– E v o lu t io n a r y
A lg o r it h m s
B lo g
Jeroen
Ted
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 3
J a v a O n e
2 2 t /m 2 6 s e p t e m b e r
S a n F r a n c is c o
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 4
J a v a S E 8
J S R 3 3 7
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 5
J a v a S E 8 (J S R 3 3 7 )
• L a m b d a e x p r e s s io n s
• B u lk d a t a o p e r a t io n s f o r c o lle c t io n s
– F ilt e r , m a p , r e d u c e
– S t r e a m it e r a t o r
• P a r a lle l a r r a y s o r t in g
• E x t e n s io n m e t h o d s
• D a t e a n d T im e A P I
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 6
J a v a S E 8 (J S R 3 3 7 ) L a m b a
E x p r e s s io n s
public interface ActionListener extends EventListener {
public void actionPerformed(ActionEvent e);
}
JButton testButton = new JButton("Testknopje");
testButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
System.out.println("Klik met Anon class");
}
});
testButton.addActionListener(e -> System.out.println("Klik met Lambda"));
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 7
J a v a S E 8 (J S R 3 3 7 ) B u lk O p e r a t io n s
List<Integer> numbers =
Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
// Verdubbel het eerste even getal groter dan 3 uit de lijst.
numbers.stream() // vs .parallelStream()
.filter(number -> number > 3)
.filter(number -> number % 2 == 0)
.mapToInt(number -> number * 2)
.findFirst()
.getAsInt()
// antwoord: 8
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 8
J a v a S E 8 (J S R 3 3 7 ) P a r a lle l A r r a y
S o r t in g
Arrays.sort(numbers) vs. Arrays.parallelSort(numbers)
V e r t ic a a l: t ijd , H o r iz o n t a a l: a a n t a l e le m e n t e n (4 C P U ’s )
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 9
J a v a S E 8 (J S R 3 3 7 ) E x t e n s io n
M e t h o d s
public interface Iterable<T> {
Iterator<T> iterator();
default void forEach(Consumer<? super T> action) {
Objects.requireNonNull(action);
for (T t : this) {
action.accept(t);
}
}
}
numbers.forEach(System.out::println);
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 0
J a v a S E 8 (J S R 3 3 7 ) : D a t e a n d T im e
A P I
static import java.time.Month.JUNE;
static import java.time.Month.DECEMBER;
LocalDate date = LocalDate.of(2013, JUNE, 30);
Month month = DECEMBER;
int monIndex = month.getValue(); // 1..12
ZonedDateTime now = ZonedDateTime.now();
String nowString = now.toString();
// 2013-08-06T18:12:17.423-04:00[America/New_York]
DateTimeFormatter fmt =
DateTimeFormatter.ISO_ZONED_DATE_TIME;
String nowFormatted = now.format(fmt);
// 2013-08-06T18:12:17.423-04:00[America/New_York]
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 1
J a v a S E 8 L in k s
J D K 8 P r o je c t P a g e
• h t t p : //o p e n jd k . ja v a . n e t /p r o je c t s /jd k 8 /
E a r ly A c c e s s J D K 8 J a v a d o c
• h t t p : //d o w n lo a d . ja v a . n e t /jd k 8 /d o c s
D e v e lo p e r P r e v ie w D o w n lo a d
• h t t p s : //jd k 8 . ja v a . n e t /d o w n lo a d . h t m l
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 2
J a v a E E 7
J S R 3 4 2
w w w . o r a c le . c o m /t e c h n e t w o r
k /ja v a /ja v a e e
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 3
J a v a E E 7
• J S O N
• W e b S o c k e t 1 . 0
• J A X -R S 2 . 0
• J S F 2 . 2
• S e r v le t 3 . 1
• E x p r e s s io n L a n g u a g e 3 . 0
• B a t c h 1 . 0
• C o n c u r r e n c y 1 . 0
• J M S 2 . 0
• J P A 2 . 1
• E J B 3 . 2
• C D I 1 . 1
• B e a n V a lid a t io n 1 . 1
• J T A 1 . 2
• In t e r c e p t o r s 1 . 2
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 4
J a v a E E 7
W e b s o c k e t A P I
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 5
J a v a E E 7
J a v a A P I f o r J S O N P r o c e s s in g 1 . 0
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 6
J a v a E E 7
J a v a S e r v e r F a c e s 2 . 2
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 7
J a v a E E 7
B a t c h A p p lic a t io n s f o r t h e J a v a P la t f o r m 1 . 0
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 8
H ig h lig h t s
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 9
B lin g ID E
T h e G P U -P o w e r e d G a m e ID E
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 0
E r r a i F r a m e w o r k
• H T M L 5 /C S S t e m p la t e s
• M a k k e lijk d e le n v a n c o d e o p c lie n t e n s e r v e r
• G W T o n d e r d e m o t o r k a p
• G e m a k v a n a n n o t a t ie s m e t C D I
• T w o -w a y d a t a b in d in g
• L o c a l s t o r a g e v ia J P A + d a t a s y n c
• M o b ile f e a t u r e s v ia P h o n e G a p
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 1
E r r a i F r a m e w o r k
H T M L 5 /C S S t e m p la t e s
<!DOCTYPE html>
<link href="css/bootstrap.css" rel="stylesheet">
<form data-field="app-template">
<input data-field="name" type="text" placeholder="Full Name">
<input data-field="email" type="text"
placeholder="you@example.com">
<textarea data-field="complaint" rows="10"></textarea>
<button data-field="submit">Submit</button>
</form>
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 2
E r r a i F r a m e w o r k
H e t g e m a k v a n a n n o t a t ie s .
@Page
@Templated
public class ComplaintForm extends Composite {
@Inject @Model private UserComplaint model;
@Inject @Bound @DataField private TextBox name;
@Inject @Bound @DataField private TextBox email;
@Inject @Bound @DataField private TextArea complaint;
@Inject @DataField private Button submit;
@Inject private EntityManager entityManager;
@Inject private ClientSyncManager syncManager;
}
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 3
E r r a i F r a m e w o r k
L in k s
W e b s it e :
• h t t p : //w w w . e r r a ip r o je c t . o r g
S lid e s :
• h t t p s : //o r a c le u s . a c t iv e e v e n t s . c o m /2 0 1 3 /c o n n e c t /f ile
D o w n lo a d /s e s s io n /2 9 D B B 4 5 5 B F 0 2 C 1 3 8 0 4 1 F A 2 3
D 7 1 D 5 2 8 C 0 /C O N 4 3 1 3 _S a d ile k F u e r t h . p d f
V id e o :
• h t t p : //y o u t u . b e /r z 2 X 6 6 7 W k _4
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 4
F u n c t io n a l R e a c t iv e P r o g r a m m in g w it h
R x J a v a
R x J a v a
“A library for composing
asynchronous and event-
based programs using
observable sequences for
the Java VM”
h t t p s : //g it h u b . c o m /n e t
f lix /r x ja v a
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 5
T e n T h in g s Y o u S h o u ld K n o w W h e n
W r it in g G o o d U n it T e s t C a s e s in J a v a
1 . T h in k b e f o r e y o u a c t
2 . M a k e y o u r t e s t s u n d e r s t a n d a b le
3 . K e e p y o u r t e s t s “ s m a ll a n d s im p le ”
4 . T e s t o n e t h in g o n ly
5 . F a s t t e s t s o n ly
6 . A b s o lu t e r e p e a t a b ilit y
7 . In d e p e n d e n t t e s t s o n ly
8 . P r o v id e d ia g n o s t ic d a t a o n f a ilu r e
9 . N o h a r d -c o d in g o f y o u r e n v ir o n m e n t
1 0 . N o e x t r a n e o u s in p u t
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 6
E v o lu t io n a r y A lg o r it h m s
T h e K e y t o S o lv in g C o m p le x J a v a P u z z le s
s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 7
F ir s t 8
f ir s t 8 . n l/b lo g
f a c e b o o k . c o m /F i
r s t 8 B V
@F ir s t 8 B V

More Related Content

What's hot

Building a Drupal 8 theme with new-fangled awesomeness
Building a Drupal 8 theme with new-fangled awesomenessBuilding a Drupal 8 theme with new-fangled awesomeness
Building a Drupal 8 theme with new-fangled awesomeness
Heather Brooke Drummond
 

What's hot (20)

filip_berte_bio
filip_berte_biofilip_berte_bio
filip_berte_bio
 
Intellectual property 2019 ver. β2(著作権法改正)
Intellectual property 2019 ver. β2(著作権法改正)Intellectual property 2019 ver. β2(著作権法改正)
Intellectual property 2019 ver. β2(著作権法改正)
 
Polytetrafluoroethylene (PTFE) market summary
Polytetrafluoroethylene (PTFE) market summaryPolytetrafluoroethylene (PTFE) market summary
Polytetrafluoroethylene (PTFE) market summary
 
Advertentie Starscreen
Advertentie StarscreenAdvertentie Starscreen
Advertentie Starscreen
 
Building a Drupal 8 theme with new-fangled awesomeness
Building a Drupal 8 theme with new-fangled awesomenessBuilding a Drupal 8 theme with new-fangled awesomeness
Building a Drupal 8 theme with new-fangled awesomeness
 
Supply Chain Public Workshop SCOR Model Singapore March 2014 iCognitive
Supply Chain Public Workshop SCOR Model Singapore March 2014 iCognitiveSupply Chain Public Workshop SCOR Model Singapore March 2014 iCognitive
Supply Chain Public Workshop SCOR Model Singapore March 2014 iCognitive
 
Revised mba-syllabus-2011 for Mysore University
Revised mba-syllabus-2011 for Mysore UniversityRevised mba-syllabus-2011 for Mysore University
Revised mba-syllabus-2011 for Mysore University
 
Cv mustafa çardak
Cv mustafa çardakCv mustafa çardak
Cv mustafa çardak
 
Crecimiento 5 leccion 3
Crecimiento 5 leccion 3Crecimiento 5 leccion 3
Crecimiento 5 leccion 3
 
Fish out of water
Fish out of waterFish out of water
Fish out of water
 
Maintenance Programs – Forklift Systems
Maintenance Programs – Forklift SystemsMaintenance Programs – Forklift Systems
Maintenance Programs – Forklift Systems
 
CUENTOS MAPUCHES DEL LAGO ESCONDIDO-PARTE 1
CUENTOS MAPUCHES DEL LAGO ESCONDIDO-PARTE 1CUENTOS MAPUCHES DEL LAGO ESCONDIDO-PARTE 1
CUENTOS MAPUCHES DEL LAGO ESCONDIDO-PARTE 1
 
Cuentos Mapuches del Lago Escondido - Libro parte 3
Cuentos Mapuches del Lago Escondido - Libro parte 3Cuentos Mapuches del Lago Escondido - Libro parte 3
Cuentos Mapuches del Lago Escondido - Libro parte 3
 
Cuentos Mapuches del Lago Escondido - Parte 2
Cuentos Mapuches del Lago Escondido - Parte 2Cuentos Mapuches del Lago Escondido - Parte 2
Cuentos Mapuches del Lago Escondido - Parte 2
 
CAJERO VENDEDOR DE COFFE MUSIC 90´ T.T
CAJERO VENDEDOR DE COFFE MUSIC 90´ T.TCAJERO VENDEDOR DE COFFE MUSIC 90´ T.T
CAJERO VENDEDOR DE COFFE MUSIC 90´ T.T
 
Designing a Libre Font Specimen Book
Designing a Libre Font Specimen BookDesigning a Libre Font Specimen Book
Designing a Libre Font Specimen Book
 
Forex Rating Formula v4.0
Forex Rating Formula v4.0Forex Rating Formula v4.0
Forex Rating Formula v4.0
 
El diseño de la investigació social francisco gomezjara (1975-reduced)
El diseño de la investigació social   francisco gomezjara (1975-reduced)El diseño de la investigació social   francisco gomezjara (1975-reduced)
El diseño de la investigació social francisco gomezjara (1975-reduced)
 
Risk Assesment
Risk AssesmentRisk Assesment
Risk Assesment
 
Offres
OffresOffres
Offres
 

Viewers also liked

Viewers also liked (8)

Frits Hoogland - About multiblock reads
Frits Hoogland - About multiblock readsFrits Hoogland - About multiblock reads
Frits Hoogland - About multiblock reads
 
Oracle 12c Launch Event 03 Web logic 12.1.2 new features Edwin Biemond
Oracle 12c Launch Event 03 Web logic 12.1.2 new features Edwin BiemondOracle 12c Launch Event 03 Web logic 12.1.2 new features Edwin Biemond
Oracle 12c Launch Event 03 Web logic 12.1.2 new features Edwin Biemond
 
A case of Fusion Middleware - iLOUG 2013
A case of Fusion Middleware - iLOUG 2013A case of Fusion Middleware - iLOUG 2013
A case of Fusion Middleware - iLOUG 2013
 
Oracle 12c Launch Event 01 JDeveloper Jonathan Damen and Marcel Oldenkamp
Oracle 12c Launch Event 01 JDeveloper Jonathan Damen and Marcel OldenkampOracle 12c Launch Event 01 JDeveloper Jonathan Damen and Marcel Oldenkamp
Oracle 12c Launch Event 01 JDeveloper Jonathan Damen and Marcel Oldenkamp
 
Alternative channels – interacting through channels beyond browser on desktop
Alternative channels – interacting through channels beyond browser on desktopAlternative channels – interacting through channels beyond browser on desktop
Alternative channels – interacting through channels beyond browser on desktop
 
AMIS OOW Review - Deel 6 - Emiel Paasschens
AMIS OOW Review - Deel 6 - Emiel PaasschensAMIS OOW Review - Deel 6 - Emiel Paasschens
AMIS OOW Review - Deel 6 - Emiel Paasschens
 
Goodbye Nightmare: Tips and Tricks for Creating Complex Layouts with Oracle A...
Goodbye Nightmare: Tips and Tricks for Creating Complex Layouts with Oracle A...Goodbye Nightmare: Tips and Tricks for Creating Complex Layouts with Oracle A...
Goodbye Nightmare: Tips and Tricks for Creating Complex Layouts with Oracle A...
 
AMIS Oracle JDeveloper 12c 07 ADF faces skin editor-Betty van Dongen
AMIS Oracle JDeveloper 12c 07 ADF faces skin editor-Betty van DongenAMIS Oracle JDeveloper 12c 07 ADF faces skin editor-Betty van Dongen
AMIS Oracle JDeveloper 12c 07 ADF faces skin editor-Betty van Dongen
 

More from Getting value from IoT, Integration and Data Analytics

More from Getting value from IoT, Integration and Data Analytics (20)

AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: DataAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
 
10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel
 
Iot in de zorg the next step - fit for purpose
Iot in de zorg   the next step - fit for purpose Iot in de zorg   the next step - fit for purpose
Iot in de zorg the next step - fit for purpose
 
Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct
 
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
 
Industry and IOT Overview of protocols and best practices Conclusion Connect
Industry and IOT Overview of protocols and best practices  Conclusion ConnectIndustry and IOT Overview of protocols and best practices  Conclusion Connect
Industry and IOT Overview of protocols and best practices Conclusion Connect
 
IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...
 
R introduction decision_trees
R introduction decision_treesR introduction decision_trees
R introduction decision_trees
 
Introduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas JellemaIntroduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas Jellema
 
IoT and the Future of work
IoT and the Future of work IoT and the Future of work
IoT and the Future of work
 
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
 
Ethereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter ReitsmaEthereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter Reitsma
 
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - ConclusionBlockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
 
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
 
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
 
Omc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van SoestOmc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van Soest
 

JavaOne 2013 - First8 / AMIS Review

  • 1. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 J a v a O n e 2 0 1 3 2 2 – 2 6 s e p t e m b e r , S a n F r a n c is c o
  • 2. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 A g e n d a W e lk o m • J a v a O n e • J a v a S E 8 • J a v a E E 7 • H ig h lig h t s – B lin g ID E – E r r a i – R x J a v a – U n it T e s t in g – E v o lu t io n a r y A lg o r it h m s B lo g Jeroen Ted
  • 3. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 3 J a v a O n e 2 2 t /m 2 6 s e p t e m b e r S a n F r a n c is c o
  • 4. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 4 J a v a S E 8 J S R 3 3 7
  • 5. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 5 J a v a S E 8 (J S R 3 3 7 ) • L a m b d a e x p r e s s io n s • B u lk d a t a o p e r a t io n s f o r c o lle c t io n s – F ilt e r , m a p , r e d u c e – S t r e a m it e r a t o r • P a r a lle l a r r a y s o r t in g • E x t e n s io n m e t h o d s • D a t e a n d T im e A P I
  • 6. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 6 J a v a S E 8 (J S R 3 3 7 ) L a m b a E x p r e s s io n s public interface ActionListener extends EventListener { public void actionPerformed(ActionEvent e); } JButton testButton = new JButton("Testknopje"); testButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ System.out.println("Klik met Anon class"); } }); testButton.addActionListener(e -> System.out.println("Klik met Lambda"));
  • 7. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 7 J a v a S E 8 (J S R 3 3 7 ) B u lk O p e r a t io n s List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); // Verdubbel het eerste even getal groter dan 3 uit de lijst. numbers.stream() // vs .parallelStream() .filter(number -> number > 3) .filter(number -> number % 2 == 0) .mapToInt(number -> number * 2) .findFirst() .getAsInt() // antwoord: 8
  • 8. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 8 J a v a S E 8 (J S R 3 3 7 ) P a r a lle l A r r a y S o r t in g Arrays.sort(numbers) vs. Arrays.parallelSort(numbers) V e r t ic a a l: t ijd , H o r iz o n t a a l: a a n t a l e le m e n t e n (4 C P U ’s )
  • 9. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 9 J a v a S E 8 (J S R 3 3 7 ) E x t e n s io n M e t h o d s public interface Iterable<T> { Iterator<T> iterator(); default void forEach(Consumer<? super T> action) { Objects.requireNonNull(action); for (T t : this) { action.accept(t); } } } numbers.forEach(System.out::println);
  • 10. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 0 J a v a S E 8 (J S R 3 3 7 ) : D a t e a n d T im e A P I static import java.time.Month.JUNE; static import java.time.Month.DECEMBER; LocalDate date = LocalDate.of(2013, JUNE, 30); Month month = DECEMBER; int monIndex = month.getValue(); // 1..12 ZonedDateTime now = ZonedDateTime.now(); String nowString = now.toString(); // 2013-08-06T18:12:17.423-04:00[America/New_York] DateTimeFormatter fmt = DateTimeFormatter.ISO_ZONED_DATE_TIME; String nowFormatted = now.format(fmt); // 2013-08-06T18:12:17.423-04:00[America/New_York]
  • 11. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 1 J a v a S E 8 L in k s J D K 8 P r o je c t P a g e • h t t p : //o p e n jd k . ja v a . n e t /p r o je c t s /jd k 8 / E a r ly A c c e s s J D K 8 J a v a d o c • h t t p : //d o w n lo a d . ja v a . n e t /jd k 8 /d o c s D e v e lo p e r P r e v ie w D o w n lo a d • h t t p s : //jd k 8 . ja v a . n e t /d o w n lo a d . h t m l
  • 12. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 2 J a v a E E 7 J S R 3 4 2 w w w . o r a c le . c o m /t e c h n e t w o r k /ja v a /ja v a e e
  • 13. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 3 J a v a E E 7 • J S O N • W e b S o c k e t 1 . 0 • J A X -R S 2 . 0 • J S F 2 . 2 • S e r v le t 3 . 1 • E x p r e s s io n L a n g u a g e 3 . 0 • B a t c h 1 . 0 • C o n c u r r e n c y 1 . 0 • J M S 2 . 0 • J P A 2 . 1 • E J B 3 . 2 • C D I 1 . 1 • B e a n V a lid a t io n 1 . 1 • J T A 1 . 2 • In t e r c e p t o r s 1 . 2
  • 14. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 4 J a v a E E 7 W e b s o c k e t A P I
  • 15. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 5 J a v a E E 7 J a v a A P I f o r J S O N P r o c e s s in g 1 . 0
  • 16. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 6 J a v a E E 7 J a v a S e r v e r F a c e s 2 . 2
  • 17. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 7 J a v a E E 7 B a t c h A p p lic a t io n s f o r t h e J a v a P la t f o r m 1 . 0
  • 18. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 8 H ig h lig h t s
  • 19. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 1 9 B lin g ID E T h e G P U -P o w e r e d G a m e ID E
  • 20. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 0 E r r a i F r a m e w o r k • H T M L 5 /C S S t e m p la t e s • M a k k e lijk d e le n v a n c o d e o p c lie n t e n s e r v e r • G W T o n d e r d e m o t o r k a p • G e m a k v a n a n n o t a t ie s m e t C D I • T w o -w a y d a t a b in d in g • L o c a l s t o r a g e v ia J P A + d a t a s y n c • M o b ile f e a t u r e s v ia P h o n e G a p
  • 21. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 1 E r r a i F r a m e w o r k H T M L 5 /C S S t e m p la t e s <!DOCTYPE html> <link href="css/bootstrap.css" rel="stylesheet"> <form data-field="app-template"> <input data-field="name" type="text" placeholder="Full Name"> <input data-field="email" type="text" placeholder="you@example.com"> <textarea data-field="complaint" rows="10"></textarea> <button data-field="submit">Submit</button> </form>
  • 22. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 2 E r r a i F r a m e w o r k H e t g e m a k v a n a n n o t a t ie s . @Page @Templated public class ComplaintForm extends Composite { @Inject @Model private UserComplaint model; @Inject @Bound @DataField private TextBox name; @Inject @Bound @DataField private TextBox email; @Inject @Bound @DataField private TextArea complaint; @Inject @DataField private Button submit; @Inject private EntityManager entityManager; @Inject private ClientSyncManager syncManager; }
  • 23. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 3 E r r a i F r a m e w o r k L in k s W e b s it e : • h t t p : //w w w . e r r a ip r o je c t . o r g S lid e s : • h t t p s : //o r a c le u s . a c t iv e e v e n t s . c o m /2 0 1 3 /c o n n e c t /f ile D o w n lo a d /s e s s io n /2 9 D B B 4 5 5 B F 0 2 C 1 3 8 0 4 1 F A 2 3 D 7 1 D 5 2 8 C 0 /C O N 4 3 1 3 _S a d ile k F u e r t h . p d f V id e o : • h t t p : //y o u t u . b e /r z 2 X 6 6 7 W k _4
  • 24. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 4 F u n c t io n a l R e a c t iv e P r o g r a m m in g w it h R x J a v a R x J a v a “A library for composing asynchronous and event- based programs using observable sequences for the Java VM” h t t p s : //g it h u b . c o m /n e t f lix /r x ja v a
  • 25. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 5 T e n T h in g s Y o u S h o u ld K n o w W h e n W r it in g G o o d U n it T e s t C a s e s in J a v a 1 . T h in k b e f o r e y o u a c t 2 . M a k e y o u r t e s t s u n d e r s t a n d a b le 3 . K e e p y o u r t e s t s “ s m a ll a n d s im p le ” 4 . T e s t o n e t h in g o n ly 5 . F a s t t e s t s o n ly 6 . A b s o lu t e r e p e a t a b ilit y 7 . In d e p e n d e n t t e s t s o n ly 8 . P r o v id e d ia g n o s t ic d a t a o n f a ilu r e 9 . N o h a r d -c o d in g o f y o u r e n v ir o n m e n t 1 0 . N o e x t r a n e o u s in p u t
  • 26. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 6 E v o lu t io n a r y A lg o r it h m s T h e K e y t o S o lv in g C o m p le x J a v a P u z z le s
  • 27. s lid e© C o p y r ig h t 2 0 1 3 . F ir s t 8 2 7 F ir s t 8 f ir s t 8 . n l/b lo g f a c e b o o k . c o m /F i r s t 8 B V @F ir s t 8 B V