subject

Public static void main(string[] args)

int[] responses = { 1, 2, 5, 4, 3, 5, 2, 1, 3, 3, 1, 4, 3, 3, 3,
2. 3. 3. 2. 14]

int[] frequency = new int[6];

for (int answer = 0; answer < responses. length; answer++)

try
++frequency[responses [answer]];

catch (arrayindexoutofbounds exception e)

system. out. println(e);
system. out. printf(" responses [%d] = %d%n%n", answer, responses (answer]);

what try and catch did here?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
In the lab, which of the following displayed a list of all installed services and included a description of the service, the current state, and whether the service started automatically or manually? a. the services manager b. the applications summary c. the recommended services d. list the safe services list
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
How do we use the sumif formula (when dealing with different formats) ?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
You know the right answer?
Public static void main(string[] args)

int[] responses = { 1, 2, 5, 4, 3, 5, 2, 1, 3, 3,...
Questions
question
Mathematics, 06.05.2021 14:00
question
Mathematics, 06.05.2021 14:00
question
Mathematics, 06.05.2021 14:00
question
Mathematics, 06.05.2021 14:00
question
Mathematics, 06.05.2021 14:00
question
Mathematics, 06.05.2021 14:00
question
Chemistry, 06.05.2021 14:00
question
Mathematics, 06.05.2021 14:00
Questions on the website: 13722361