This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 28
October 29, 1997
Given the Java statement:
int [ ] v = { 11, 4, 9, ... };
write Java code that will store the smallest array entry in a variable minVal and the largest array entry in a variable maxVal.
You may need to declare the variables minVal and maxVal and write a code segment that searches the array for the smallest and largest values.
Use v.length to determine the number of entries actually in the array.