MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/b2zas5/java_12_released/eiyggh3/?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. 3 u/lbkulinski Mar 20 '19 edited Mar 20 '19 var was added in Java 10.
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.
3
var was added in Java 10.
var
0
u/Senator_Ahn Mar 20 '19
Just a question, what happened to var replacing primitive types? Ex) var ten = 10 var str = "string"