What will be the output of the following program?

Last Updated :
Discuss
Comments

What will be the output of the following program?

Java
int[] arr = {5, 10, 15, 20, 25};
int sum = 0;
for (int num : arr) {
    sum += num;
}
System.out.println(sum);


50

60

55

65

Share your thoughts in the comments