我是增加一个值给我的数组列表,但它显示错误。在添加值之前,我先显示它。该值正在显示,但未添加到数组列表。请帮我对此...如何在android中为arraylist添加值?
我的代码:提前
static ArrayList<String> allfirstids;
ArrayList<String> list = List.get(i);
UserBO user = new UserBO();
user.firstid = Integer.parseInt(list.get(0));
user.secondid = Integer.parseInt(list.get(1));
System.out.print("Hello this is first id");
System.out.print(list.get(0));
allfirstids.add(list.get(0));
System.out.println("first ids"+allfirstids);
谢谢...
它显示错误?什么错误? – 2012-04-23 04:58:52