Stuck on a Java program?

This particular code teaches on an ArrayList branded myList2.That contains items.The code should preferably display a strong object whether a given condition is happy and without delay delete in which object (if the particular given ailment is satisfied).The eliminate function looked like the obvious approach to take but the item throws a exception.Any insight from you guys could well be greatly appreciated.

open public void OptionTwo(ArrayList myList2)
//get customer input with sum_desired
int reverse = 0;
int sum_desired = tool.getUserInput(“Was there a specific sum you were going to look up”);
Process.out.println(“The combinations for that requested cost:”);
for(DiceRoll cell2:myList2)
int holder2 = cell2.getCombo();
if(holder2 == sum_desired)
Process.out.println(cell2.getFirst() + “+” + cell2.getSecond());
myList2.remove(counter);
//endif
reverse = counter + JUST ONE;
//endfor

consider what are the results to aspect #2 within your list while you remove aspect #1…your second becomes the primary, and your third is now cost-free and so forth.yet ones count is incremented, inspite of your checklist becoming shorter and aspects shifting along.

Leave a Reply