为什么应将显式类型参数替换为菱形?

Why explicit type argument should be replaced by diamond?

我正在使用 Android Studio,我写了这个:

List<Button> buttons = new ArrayList<Button>();

我有这条消息:

Explicit type argument Button should be replaced by <>

我很好奇,为什么用钻石代替会更好?

List<Button> buttons = new ArrayList<>();

编辑:
我完全不同意重复!我之前看过那个答案,它将显式参数与根本没有参数进行比较,而我将显式参数与隐式参数进行比较!

它不那么冗长,请考虑以下内容

Map<String,List<String>> map = new HashMap<String,List<String>>();

对比

Map<String,List<String>> map = new HashMap<>();

我想你会选择第二个选项