Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void busiesthour()
- {
- for (int hour=0; hour>hourCounts.length; hour++){
- if(hourCounts[hour]>hourCounts[hour-1]){
- //if value is bigger than last value set it equal to local max.
- int localMax = hourCounts[hour];
- //if next value in array is greater than localMax, set this to localMax
- if(hourCounts[hour] > localMax) {
- localMax = hourCounts[hour];
- }
- System.out.println(localMax);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement