I am very new to Java and am taking my first Java class at the moment. I'm trying to add up an array that takes user input and not simply just filling in the array with predetermined numbers. Would the code to get the sum of the the array be the same as a predetermined array? Here is the code that I have. 

```
import java.util.Scanner;

public class Main {

public static void main(String[] args)
{

Scanner scan = new Scanner(System.in);

    int[] monthSales = new int[12];

    String[] monthNames = new String[12];
       monthNames[0] = "January";
       monthNames[1] = "February";
       monthNames[2] = "March";
       monthNames[3] = "April";
       monthNames[4] = "May";
       monthNames[5] = "June";
       monthNames[6] = "July";
       monthNames[7] = "August";
       monthNames[8] = "September";
       monthNames[9] = "October";
       monthNames[10] = "November";
       monthNames[11] = "December";

    int i = 0;

    while (i <= 11) 
    {
    System.out.println("What was the sales for the month of " + monthNames[i] + ": ");
    monthSales[i] = scan.nextInt();
    i++;

    }       
}
}

```