为了保存一个由一个成员完成支付的ArrayList,我想将支付ID列表更改为一个字符串,所以我创建了以下方法:
public String fromArraytoString(ArrayList items){
JSONObject json = new JSONObject();
json.put("uniqueArrays", new JSONArray(items));
return json.toString();
}
Run Code Online (Sandbox Code Playgroud)
但我收到以下警告:
ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized
Run Code Online (Sandbox Code Playgroud)
谁能解释我为什么?