Architect at Accenture Global Java Lead / Spain DevOps Lead / Advanced Technology Center in Spain – Software Engineering Lead MálagaJUG Co-lead Father of two, husband, whistle player, video gamer, sci-fi *.*, Lego, LOTR, Star Wars, Star Trek, Starcraft, Destiny, Halo, Borderlands, Raspberry Pi, Arduino… LLAP!
All rights reserved. 12 “At the core of the Java ecosystem is the JVM. Most people talk about Java the language, and this may sound odd coming from me, but I could hardly care less. What I really care about is the Java Virtual Machine as a concept, because that is the thing that ties it all together.”
Hidalgo. All rights reserved. 20 MANY JDK BUILDS TO CHOOSE FROM: ORACLE RED HAT IBM SAP (SAPMACHINE) MICROSOFT AZUL ZULU (& ZING) AMAZON CORRETTO ADOPTOPENJDK
Hidalgo. All rights reserved. 25 Java 16 (full list here) Records (final) Pattern matching for instanceof (final) Vector API (preview) Sealed classes (second preview) Static members in inner classes Stream.toList() Migration from Mercurial to Git Windows ARM64 & Alpine Ports
rights reserved. 27 before int days = 0; switch (month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: days = 31; break; case 4: case 6: case 9: days = 30; break; case 2: days = 28; break; default: throw new IllegalArgumentException("Invalid month"); }
after public record AuditInfo( LocalDateTime createdOn, String createdBy, LocalDateTime updatedOn, String updatedBy) { } how to use it var rec = new AuditInfo( LocalDateTime.now().minusHours(1), "jorge", LocalDateTime.now(), "paco"); System.put.println(rec.updatedBy());
35 after (full example in GitHub here) static final VectorSpecies<Float> SPECIES = FloatVector.SPECIES_PREFERRED; void vectorComputation( float[] a, float[] b, float[] c) { for (int i = 0; i < a.length; i += SPECIES.length()) { var mask = SPECIES.indexInRange(i, a.length); var va = FloatVector.fromArray( SPECIES, a, i, mask); var vb = FloatVector.fromArray( SPECIES, b, i, mask); va.pow(2).add(vb.pow(2)).neg().intoArray( c, i, mask); } }