8.4 Programming Activity 1: Working with Arrays
In this activity, you will work with a 15-element integer array. Specifically, you will write the code to perform the following operations:
fill the array with random numbers between 30 and 99
print the array
set every array element to a specified value
count the number of elements with a specified value
find the minimum value in the array
The framework for this Programming Activity will animate your algorithm so that you can check the accuracy of your code. For example, Figure 8.17 shows the application counting the elements having the value 73.
Get Java Illuminated, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.