[JAVA] [Memo] JJUG Night Seminar

Personal notes for the JJUG Night Seminar

Kishida's story

--Basically, the story of Qiita --Language and API talk --JEP 8 API 2 --No effect on writing programs --The switch statement is still a preview, so you shouldn't use it in your product. --Introduction of the ones that fall into 12 and the ones that are likely to be 13

The story of the switch

--From statement to expression --Cannot be used without enable preview with javac etc. ――Maybe the specifications will change, so don't use it aggressively now --Multiple cases are possible --You can have multiple values in the case clause --arrow syntax --Lambda type can be used --No break required --Easy to see and write --When writing blocks, when having multiple processes --switch becomes an expression --A case corresponding to all is required (quantification / character string must be default)

Notes

--Cannot be used without enable preview with javac etc. --The place where the value is returned by break is suspicious (it seems to be break-with) --Keywords with-as a java language specification are likely to increase - break-with --package-private (if you want to declare it explicitly)

JVM Constant API --There is a symbol reference inside the Java language specification, and the symbol reference can be used from the API. ――It seems to be used when you mess up reflection when creating a class file ――I don't really think about programming

CDS Archives ――It makes you feel good to put together class information about the system. --Startup is a little quicker

Shennandoah ――Can you fill in between G1GC and zgc? -It seems to read Shenando

Microbenchmark Suite --No ordinary people use it (Mr. Sakuraba) --It's the one who sees the performance of the JDK, so it's only used by JDK developers

Other API changes

Collectors.teeing --When you want to use the values of two Collectors --counting and joining

String.transform() --When getting from map and then getting from map with its return value --Like str.transform (Class: get) .transform (Class: get)

String.indent() --Like str.indent (3) ――The indent will come back --Negative value is also possible --Ignored if there is no white space

NumberFormat.getCompactNumberInstance() --If you pass a number to .format, it will be converted. --Support up to trillion

FileMismatch --Returns the first of the two files in a different position ――It will tell you what is different

skipNBytes --Kishida-san's Qiita is written

There may be Java13

--Switch formalization

switch --preview seems to come off

JPackage --Same contents as JavaFX packager -Kishida-san's blog --It seems that you can create a file tree containing the JDK and package it.

NullPointerException specification change

――It may be easier to understand where the Nullpo happened

Revival of RawStringLiterals

--Originally, enclose the character string including the opening etc. in backticks ――But it seems that it wasn't easy --Three double quotes? ――The preview may not be in time at 13

David Buck's story

--JVM engineer --I don't know anything about weblogic

demo

--Use Shenandoah --Not included in Oracle JDK --Because it's a Red Hat project --Www I can't talk to myself --It's over www

ZGC story

What is ZGC

--What is z? --There was zfs (zettabyte file system) --zettabyte is 1000 to the 7th power = 1 billion terabytes --zebibyte is 1024 to the 7th power --zfs and zgc are not so related --GC of JDK11 or later

Features of ZGC

――No matter how big the heap is used, the response does not change. --Effects route references --Reduce the number of Java execution threads --Concurrent GC except for thread scanning ――It seems to be very epoch-making --Address space is reserved for 4TB --You can mess with GC worker threads by tuning, but the number of execution threads will decrease.

Links that may be helpful

-Java12 new feature summary by Kishida-san -Kishida's blog -Sakuraba's blog -Cybozu's GC blog

Recommended Posts

[Memo] JJUG Night Seminar
JJUG CCC Spring 2018 memo
JJUG CCC 2018 Spring participation memo
Join us for Java events! (JJUG Night Seminar, JJUG CCC, Oracle Code Tokyo, Oracle Code One)