This is scala!!!

This is scala!!!

Comparison between Java language according to the JEP 286 and Scala language.


[JEP 286: Local-Variable Type Inference
Enhance the Java Language to extend type inference to declarations of local variables with initializers. We seek to…]( "")

This is code java according to JEP 286:

var path = Path.of(fileName);
var fileStream = new FileInputStream(path);
var bytes = Files.readAllBytes(fileStream);


This is code scala:

var path = Path.of(fileName)
var fileStream = new FileInputStream(path)
var bytes = Files.readAllBytes(fileStream)