判断一下那种写法是正确的:
ArrayList<String> list = new ArrayList<String>(); true
ArrayList<Object> list = new ArrayList<String>(); false
ArrayList<String> list = new ArrayList<Object>(); false
为了新老系统的兼用性
ArrayList list = new ArrayList<String>(); true
ArrayList<String> list = new ArrayList(); true