r/programming • • Mar 09 '16

var keyword proposed for Java

http://openjdk.java.net/jeps/286
250 Upvotes

395 comments sorted by

View all comments

Show parent comments

3

u/immibis Mar 10 '16

You don't know whether String is supposed to be a type or a variable until after you read the next token, because this is also valid:

final String x = "hello";

1

u/weltraumaffe Mar 10 '16

I see your point. Thanks :).