public static void main(String[] args){ List<List<Object>> list = new ArrayList<List<Object>>();list.add(new ArrayList<Object>());list.get(0).add("String things"); System.out.println(list.get(0).get(0));}这是我写的,没有报错使…
PHP json_decode object时报错Cannot use object of type stdClass as array php再调用json_decode从字符串对象生成json对象时,如果使用[]操作符取数据,会得到下面的错误错误:Cannot use object of type stdClass as array 产生原因:$res = json_decode($res);$res['key']; //把 json_decode() 后的对象当作数组使用. 解决方法(2种…