Multiple Choice
Which one of the following is the correct code snippet for calculating the largest value in an integer array list arrList of size 10?
A) int maximum = 0;
For (int counter = 1; counter < arrList.size() ; counter++)
{
If (arrList.get(counter) > maximum)
{
Maximum = arrList.get(counter) ;
}
}
B) int maximum = arrList.get(0) ;
For (int counter = 1; counter < arrList.size() ; counter++)
{
If (arrList.get(counter) > maximum)
{
Maximum = arrList.get(counter) ;
}
}
C) int maximum = arrList.get(1) ;
For (int counter = 1; counter < arrList.size() ; counter++)
{
If (arrList.get(counter) > maximum)
{
Maximum = arrList.get(counter) ;
}
}
D) int maximum = arrList.get(0) ;
For (int counter = 1; counter > arrList.size() ; counter++)
{
If (arrList.get(counter) < maximum)
{
Maximum = arrList.get(counter) ;
}
}
Correct Answer:

Verified
Correct Answer:
Verified
Q17: How many elements can be stored in
Q18: It may be necessary to "grow" an
Q38: What is displayed after executing the given
Q39: How many elements can be stored in
Q41: Consider the following code snippet:<br>Int[][] arr =<br>{<br>{
Q42: Babbage's machine for automatically producing printed tables
Q44: Assume the method createSomething has been defined
Q45: Which one of the following is a
Q46: Consider using a deck of cards as
Q91: If a programmer confuses the method required