I remember reading somewhere that local variables with inferred types can be reassigned with values of the same type, which would make sense.
var x = 5; x =
Would not compile, throws "incompatible types: Scanner cannot be converted to int". Local variable type inference does not change the static-typed nature of Java. In other words:
var x = 5; x = new Scanner(System.in);
is just syntactic sugar for:
int x = 5; x = new Scanner(System.in);