Hi I am wondering if it is better to use list or arrayList as a method parameter?
for example -
public static void calculate(List<T> list) {}
or
public static void calculate(ArrayList<T> list) {}
I was thinking that it was better to use List because it gives you more options to use a linked list or whatever... but if I am wrong could you tell me why ArrayList is better or why List is better?
Thanks