【发布时间】:2014-04-28 09:10:06
【问题描述】:
我从现有的客户和计算机类创建客户和计算机数组列表,如下所示
ArrayList<Customer> customer = new ArrayList<Customer>();
ArrayList<Computer> computer = new ArrayList<Computer>();
但我无法获得检索数据的选项。谁能解决这个问题?
【问题讨论】:
-
But I don't available to get option to retrieve the data我不知道你在问什么。 -
说真的,请先阅读arrayList documentation
-
我的意思是我无法检索 arrey 列表中的项目,因为它不给我 get(customer.get(index))
-
最好使用 List
=new ArrayList