java
The program will keep asking the user to insert a number until he writes "stop" or "Stop" then the loop will break and the sum of the numbers he'd inserted will be printed out. Questions are how to convert a whole list of strings to integers and how can i get the sum of the numbers in the list. i came this far: import java.util.ArrayList; import java.util.Scanner; public class loopStop { public static void main(String[] args) { while(true) { ArrayList<String> choices = new ArrayList<>() ; System.out.println("\nInsert a number!"); Scanner x = new Scanner(System.in); String inp = x.nextLine() ; choices.add(inp) ; if(inp.equals("stop")){ break; for(String a : choices){ System.out.println((int)a); } } } } }