Created
March 16, 2017 01:58
-
-
Save carlosmaniero/262ca4adab862dbe3c9556508a58bd39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Sum { | |
public static void main(String args[]) { | |
int[] array = new int[]{1, 2, 3, 4, 5}; | |
int sum = 0; | |
for (int item: array) { | |
sum += item; | |
} | |
System.out.println(sum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment