And what if Data.getBars() returns java.util.Collection<Bar>, or the line would read Collection<Bar> bars = Data.getBars(); or simply return Data.getBars().contains(bar);? Perhaps there are always at most 10 Bars and it all doesn't matter. Regardless, it is not the var keyword that would be the problem here.
4
u/thiez Mar 10 '16
And what if
Data.getBars()returnsjava.util.Collection<Bar>, or the line would readCollection<Bar> bars = Data.getBars();or simplyreturn Data.getBars().contains(bar);? Perhaps there are always at most 10Bars and it all doesn't matter. Regardless, it is not thevarkeyword that would be the problem here.