I want to rewrite the body of a code so that the For loop is replaced with an equivalent while can someone please help with a while loop ASAP!!
[ArchAngel added CODE tags]Code:/** * Print the hourly counts. * These should have been set with a prior * call to analyzeHourlyData. */ public void printHourlyCounts() { System.out.println("Hr: Count"); for(int hour = 0; hour < hourCounts.length; hour++) { System.out.println(hour + ": " + hourCounts[hour]); } } and also how do i rewrite this code with a FOR LOOP?!? public void listNotes() { int index = 0; while(index < notes.size()) { System.out.println(notes.get(index)); index++; } }


Reply With Quote


Bookmarks