I did a test task for the Junior Android developer's job, there was a line in the code:
ArrayList<String> valNames = new ArrayList<String>(); I was told that it is better to write like this:
List<String> valNames = new ArrayList<String>(); Then in one of the articles on habrahabr.ru the phrase met:
Just think, a big deal that a person does not understand why you need to write List values = new ArrayList (); instead of ArrayList values = ... .; Well, and who would not like to see names in the style of ArrayList arrayList = new ArrayList (); and smile. It is a pity that with the use of this anti-beer, all these, causing a smile, things usually show up after about a month of work.
Explain why writing is wrong. Formally - no error?