Here is original prompt:

"Write a for loop to print all NUM\_VALS elements of array hourlyTemp. Separate elements with a comma and space. Ex: If hourlyTemp = {90, 92, 94, 95}, print:
90, 92, 94, 95

Note that the last element is not followed by a comma, space, or newline."

Here is my code:

```
import java.util.Scanner;

public class PrintWithComma {
    public static void main (String [] args) {
        final int NUM_VALS = 4;
        int[] hourlyTemp = new int[NUM_VALS];
        int i = 0;

        hourlyTemp[0] = 90;
        hourlyTemp[1] = 92;
        hourlyTemp[2] = 94;
        hourlyTemp[3] = 95;

        for (i = 0; i < NUM_VALS; i++) {
            System.out.print(hourlyTemp[i] + ", ");
        }

        System.out.println("");

        return;
    }
}

```

My output is "90, 92, 94, 95, " when it should be "90, 92, 94, 95"

How do i eliminate the last comma and space?