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, 21.06.2019 17:00
Ineed a good science fair name i’m doing a homemade water filter and i have no idea what the title should be plz
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
You know the right answer?
Which one of the following is the correct code snippet for calculating the largest value in an integ...
Questions
question
Biology, 29.01.2020 00:40
question
Biology, 29.01.2020 00:40