How many times will the following loop run? Answer: int i = 0; while (i < 10) System.out.println(i): 2. Write a method that contains a while loop that simulates the rolling of one die a total of N times, where N is sent to the method. Count how many times you roll a 3 and return that number of times 3. What is the output of the code snippet given below? int val = 1; int sum = 0; while (val < 5) Answer: sum = 10; sum = sum + val; val++ : System.out.print (sum) ;