Find Sum and Largest Element in the Array

Public static void main(String args[]){

int[ ] values = {3,4,5,11,14,7};
int sum=0, large, i;

// for loop to find out the sum of elements
for(in i=0; i<6; i++)
sum += values[i];
system.out.println(“Sum = “+sum);

//for loop to find out the largest element in the array
large = values[0]
for(i=1;i<6;i++){
if(values[i]>large)
large=values[i];
}

System.out.println(“Largest value of array = “ +large);
}
}