Reading other people\'s code, I\'ve seen a lot of:
List ints = new ArrayList();
Map map = new HashMap();
It is just easier to think of String
as of String
. As well as it's easier (and more beneficial) to think of WhateverList
as of List
.
The bonuses are discussed many times, but in brief you simply separate the concerns: when you need a CharSequence
, you use it. It's highly unlikely that you need ArrayList
only: usually, any List will do.