MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/b2zas5/java_12_released/eizkrz8/?context=3
r/java • u/kedarjoshi • Mar 19 '19
98 comments sorted by
View all comments
0
Just a question, what happened to var replacing primitive types? Ex) var ten = 10 var str = "string"
5 u/PriorProfile Mar 20 '19 Local variable type inference. Added in java 10. It’s not just primitive types.var strings = new ArrayList<String>();You can do it for any local variable where the type can be inferred.
5
Local variable type inference. Added in java 10. It’s not just primitive types.
var strings = new ArrayList<String>();
You can do it for any local variable where the type can be inferred.
0
u/Senator_Ahn Mar 20 '19
Just a question, what happened to var replacing primitive types? Ex) var ten = 10 var str = "string"