0

int [ ] myArr = {6, 42, 3, 7}; int sum=0; for(int x=0; x<myArr.length; x++) { sum += myArr[x]; } System.out.println(sum)

can any one explain the flow?

20th Mar 2017, 4:39 AM
naveen roshan
naveen roshan - avatar
3 Respuestas
+ 2
58
20th Mar 2017, 5:03 AM
SR Praveen Kumar
SR Praveen Kumar - avatar
+ 1
58
20th Mar 2017, 11:36 AM
priyanka
+ 1
it gives the sum of the array elements the answer is 58
20th Mar 2017, 2:34 PM
kavi priya
kavi priya - avatar