Programming Languages, Java, Software Development, Software Engineering, Software Architecture.
be what you expected. List<String> list = new ArrayList<>(); var list = new ArrayList<String>(); Unintended inferred type. In the example below, we have an unexpected type inference: List<String> list1 = new ArrayList<>(); var list1WithVar = new ArrayList<>(); // list of Objects not Strings