Multiple Choice
For the questions below, assume an int array, candy, stores the number of candy bars sold by a group of children where candy[j] is the number of candy bars sold by child j. Assume there are 12 children in all.
-What does the following code do?
Scanner scan = Scanner.create(System.in) ;
Int value1 = scan.nextInt( ) ;
Int value2 = scan.nextInt( ) ;
Bars[value1] += value2;
A) adds 1 to the number of bars sold by child value1 and child value2
B) adds 1 to the number of bars sold by child value1
C) adds value1 to the number of bars sold by child value2
D) adds value2 to the number of bars sold by child value1
E) inputs a new value for the number of bars sold by both child value1 and child value2
Correct Answer:

Verified
Correct Answer:
Verified
Q18: If int[] x = new int[15]; and
Q31: Write a method to compute the average
Q38: Write a method that takes an array
Q43: Write a code fragment to create a
Q46: An int array stores the following values.
Q47: Which of the following GUI components operates
Q49: Both the Insertion Sort and the Selection
Q51: Which of the following is a legal
Q52: Just as arrays can only have a
Q53: The statement int[ ] list = {5,