我是学习java的几个学期,我希望将一个arraylist从一种方法转移到另一种方法。我到处都看,但找不到我需要的东西。 谢谢。
public static void addEmployee(ArrayList<String> list)
{
int i; //declares i as integer
//increments i for the array
for(i = 0; i < list.size(); i++)
list.get(i); //adds employees to an arraylist
for(i = 0; i < list.size(); i++)
addEmployee(list.get(i)); //This does not work
}//end public static void addEmplyoee(Arraylist<String> list)
public static void searchId(ArrayList<String> list)
{
}