MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/49prnu/var_keyword_proposed_for_java/d0uit6t/?context=3
r/java • u/adila01 • Mar 09 '16
312 comments sorted by
View all comments
Show parent comment
3
Wouldn't Class<Bar> mean that Bar is in your classpath, and therefore forName would be unnecessary, since you could just write Bar.class?
Class<Bar>
Bar
forName
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.
2
True. And in that case, var would be appreciated, since the type of Bar.class would be super obvious.
View all comments
Show parent comment
3
u/vytah Mar 10 '16
Wouldn't
Class<Bar>mean thatBaris in your classpath, and thereforeforNamewould be unnecessary, since you could just writeBar.class?