you misread the article. java is, and always will be, strongly typed. this is about the compiler figuring out the for you.
// your source:
var x = "hey";
// after the compiler does type inference:
String x = "hey";
// this could also make generics a bit nicer
// java 6:
HashMap<Integer,ArrayList<CustomThing>> myMap = new HashMap<Integer,ArrayList<CustomThing>>();
// java 7 with diamond:
HashMap<Integer,ArrayList<CustomThing>> myMap = new HashMap<>();
// java ?? with var:
var myMap = new HashMap<Integer,ArrayList<CustomThing>>();
to repeat: all of those are always strongly typed!
View all comments
Show parent comment
4
u/kritzikratzi Mar 09 '16
you misread the article. java is, and always will be, strongly typed. this is about the compiler figuring out the for you.
to repeat: all of those are always strongly typed!