3 ms·
For your example, it makes no difference. However, take a look at the other example mentioned at the beginning: var stream = list.stream(); // infers Str
by the_af 11y ago
For your example, it makes no difference. However, take a look at the other example mentioned at the beginning:
var stream = list.stream(); // infers Stream<String>
How would you write it in order to take advantage of type inference?