I'm having this issue with arrays. Maybe I'm approaching this in a weird way, you guys let me know. I have two arrays:
String[] months = {"January","February","March","April","May",
"June","July","August","September",
"October","November","December"};
double[] rainfall ={4.22, 3.18, 3.03, 3.52, 4.54, 5.55,
4.71, 4.35, 5.26, 5.46, 4.78, 4.09};
These numbers represent rainfall. I run the algorithm to find the Most and the Least from double[]
rainfall, and it gives me the number 3.03, which is march.
My question is, How can I correlate that subscript to the one from the array String[]
months so that it shows me the name of the month as well?
Should I make a stacked array instead?