Comparison between Java language according to the JEP 286 and Scala language.
JAVA
[JEP 286: Local-Variable Type Inference
Enhance the Java Language to extend type inference to declarations of local variables with initializers. We seek to…openjdk.java.net](http://openjdk.java.net/jeps/286 "openjdk.java.net/jeps/286")
This is code java according to JEP 286:
var path = Path.of(fileName);
var fileStream = new FileInputStream(path);
var bytes = Files.readAllBytes(fileStream);
SCALA
This is code scala:
var path = Path.of(fileName)
var fileStream = new FileInputStream(path)
var bytes = Files.readAllBytes(fileStream)