Often I see on many websites that while working with collections in Java, tutors write the code as:
List al = new ArrayList();
List li = new LinkedList();
instead of
ArrayList al = new ArrayList();
LinkedList li = new LinkedList();
Is there any specific reason why it is written that way? Does it have any advantages over the ones written below?