Java Programming Tutorial - 31 - Enhanced for Loop

package apples;
import java.util.Random;
public class boy {
public static void main (String []args) {
int thileban[]= {3, 4,5, 6, 7};
int total = 0;
for (int x:thileban) {
total +=x; 
}
System.out.println(total);
}
}

Comments