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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 15:00, lopez7512
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
image
Computers and Technology, 25.06.2019 00:30, alinton06
What is a typeface? a. a collection of similar text b. a collection of similar fonts c. a collection of similar designs d. a collection of similar colors e. a collection of similar images
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, corinnerodriguez2001
How to delete a question in
Answers: 2
image
Computers and Technology, 25.06.2019 09:30, kataldaine
Which resource produces the cleanest energy? -coal -gasoline -oil -wind
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 in other subjects:

Konu
Mathematics, 31.01.2021 06:50
Konu
Law, 31.01.2021 06:50