Java Programming Tutorial - Enhanced for Loop



import java.util.Random;

public class Coffee{

public static void main(String arg[]) { 
int thileban []= {3, 4, 5, 6, 7};
int total = 0 ;

for(int x: thileban ) {
total+=x; 
}
System.out.println(total);
}
}


type & identifier

Comments