Created
June 26, 2016 10:42
-
-
Save polyglotpiglet/7eb3a300d313b4a2b5fbad25c1c38d15 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 static void main(String... args) { | |
int count = 0; | |
for (int i =0; i <1000; i++) { | |
long startTime = System.nanoTime(); | |
for (int j = 0; j < 1000; j ++) { | |
count += j; | |
} | |
long endtime = System.nanoTime(); | |
System.out.printf("%d\n", endtime - startTime); | |
} | |
System.out.println(count); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment