subject
Computers and Technology, 28.11.2019 20:31 Shubbs

Which one of the following is the correct code snippet for calculating the largest value in an integer array list alist?
a. int max = alist. get(0); for (int count = 1; count < alist. size(); count++) { if (alist. get(count) > max) { max = alist. get(count); } }
b. int max = 0; for (int count = 1; count < alist. size(); count++) { if (alist. get(count) > max) { max = alist. get(count); } }
c. int max = alist. get(0); for (int count = 1; count > alist. size(); count++) { if (alist. get(count) > = max) { max = alist. get(count); } }
d. int max = alist[1]; for (int count = 1; count < alist. size(); count++) { if (alist. get(count) > max) { max = alist. get(count); } }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
question
Computers and Technology, 25.06.2019 03:00
Match the categories in the first column with examples in the second column. 1. good for watching movies 2. maximum power with small size 3. older style mobile devices that may or may not have internet connectivity tablet computer a.)pda b.)smart phone c.)tablet computer
Answers: 1
question
Computers and Technology, 25.06.2019 05:00
The ratio of men to women in a certain factory is 3 to 4 .there are 210 men.how many workers are there?
Answers: 2
question
Computers and Technology, 25.06.2019 05:20
6. write a user-defined matlab function for the following math function: r() = 4cos(4sin ) the input to the function is  (in radians) and the output is r. write the function such that  can be a vector. a) use the function to calculate r(/6) and r(5/6). b) use the function to plot (polar plot) r() for 0 ≤  ≤ 2. hint: use “ polar” and/or for “polar plot in matlab." include the title “'r(\theta)=4cos(4sin(\theta))”
Answers: 1
You know the right answer?
Which one of the following is the correct code snippet for calculating the largest value in an integ...
Questions
Questions on the website: 13722361