13. Project Amber
JEP286 Local Variable Type Inference
JEP368 Text Blocks
JEP361 Switch Expression
JEP305 Pattern Matching
JEP359 Records
JEP360 Sealed Type
(10)
(Second Preview in 14)
(14)
(Preview in 14/Draft)
(Preview in 14)
(Preview in 15?)
14. Local Variable Type Inference
LocalDate date = LocaleDate.now();
ローカル変数の型宣言の省略
var date = LocaleDate.now();
ダイヤモンド演算子は注意
var list = new ArrayList<>();
list の型 : ArrayList<Object>
15. Local Variable Type Inference
スタイルガイド
https://orablogs-jp.blogspot.com/2018/03/style-guidelines-for-local-variable.html
https://orablogs-jp.blogspot.com/2018/12/java-local-variable-type-inference.html
FAQ