So, as I understand it, you always need to program the interface, as in:
List<Integer> list = new LinkedList<Integer>();
So, later in my program, I:
public List<Integer> getIntegers() { return list; } public void processIntegers() {
Can I follow the best pattern here or somehow do something to avoid the cast? Casting seems very ugly in this scenario.
Thanks.
jn1kk source share