r/java • • Mar 09 '16

var keyword proposed for Java

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

312 comments sorted by

View all comments

Show parent comments

8

u/vplatt Mar 09 '16

::insert Javascript-inspired fear based response here::

8

u/stepancheg Mar 10 '16

var is JS has no type. In Java it will have type. That makes huge difference.

-1

u/Antrikshy Mar 10 '16
var v = "a"
console.log(typeof v)

???

1

u/stepancheg Mar 11 '16

Value in JS is typed (to some degree). Variable is not.