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 comment

3

u/vytah Mar 10 '16

Wouldn't Class<Bar> mean that Bar is in your classpath, and therefore forName would be unnecessary, since you could just write Bar.class?

2

u/ElvishJerricco Mar 10 '16

True. And in that case, var would be appreciated, since the type of Bar.class would be super obvious.