Wednesday, April 1, 2015

Inhance Loop

 
public class EnhanceLoop {
    public static void main(String[] args) {
        int a[]={5,2,3,5};
        int total =0;
        for(int x:a)
        {
            total+=x;
        }
        System.out.println(total);
    }
 
}

No comments:

Post a Comment