It is allowed to assign var in Java 10 with a string like:
var foo = \"boo\";
While it is not allowed to assign it with a lambda e
Because that is a non-feature:
This treatment would be restricted to local variables with initializers, indexes in the enhanced for-loop, and locals declared in a traditional for-loop; it would not be available for method formals, constructor formals, method return types, fields, catch formals, or any other kind of variable declaration.
http://openjdk.java.net/jeps/286