G
Guest
Hi,
Can anyone tell me how i can search an arraylist to find out if it contains a specific string??
i.e. the user selects a mealName from a combobox, they then enter a meal quantity. The user then presses the add button and the mealname and mealQTY is pushed to an MealNameArrayList and a MealQtyArrayList. If the mealName already exists in the MealNameArrayList i want to retrieve the index of the mealname from the arraylist so that i can use it to add the new mealqty to the previous MealQty for that meal type in the MealQtyArrayList.
Does anyone know how i can do this??
Can anyone tell me how i can search an arraylist to find out if it contains a specific string??
i.e. the user selects a mealName from a combobox, they then enter a meal quantity. The user then presses the add button and the mealname and mealQTY is pushed to an MealNameArrayList and a MealQtyArrayList. If the mealName already exists in the MealNameArrayList i want to retrieve the index of the mealname from the arraylist so that i can use it to add the new mealqty to the previous MealQty for that meal type in the MealQtyArrayList.
Does anyone know how i can do this??