Calculating the total of an int Array

public static int jbScores = {0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

public static int grandTotalJellyBeans;

How would I put the grand total of “jbScores” into a single Int so the answer would be 5

I dunno why but that didn’t work for me I tried a for loop and it did what I wanted it to do.

	public static int[] jbScores = {0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; 
public static int grandTotalJellyBeans;

	void JellyBeansTally()
	{
		for (int i = 0; i  < jbScores.Length; i++)
		{
		grandTotalJellyBeans += jbScores*;*
  •  }*
    
  • }*