How does the Program works and Executes - Java :     class Average 
    { 
    public static void main(String args[]) 
    	{ 
    	double nums[] = {10.1, 11.2, 12.3, 13.4, 14.5}; 
          // Assigning some values to the Array 
    	double result = 0; 
    	int i;
    	for(i=0; i<5; i++) 
    		result = result + nums[i];
    	System.out.println("Average is " + result / 5);
    	}
    }

How this Program Works . i have no idea about this. Can anyone explain me ?