2015-12-14 110 views
0

我有一个包含事件objects.Event对象一个ArrayList是由一个ID,日期和主题charactirised,我打印出数组的内容,我想打印一个ArrayList

ArrayList.get(INDEx) 

System.out.println(list) 

(名单是我的ArrayList) ,但我得到作为输出:

[[email protected], [email protected], 
[email protected],[email protected], [email protected], 
[email protected], [email protected]] 

研究所我的ArrayList的真正内容(metier是包的名称)的ead,有什么帮助吗?

+1

重写'Event'类的'toString()'方法? – Crozin

回答

1

问题不在于ArrayList。您会看到列表中包含的Event类别的默认toString()实现。在该类中重写此方法,您应该可以。

+0

非常感谢,我忘了重写toString() – Ahmed202