Created
June 26, 2016 14:23
-
-
Save polyglotpiglet/12e3d26dcb4f4d1f9fbba5f2b05270dd 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[] data = new int[100_000]; | |
Random random = new Random(); | |
for (int i = 0; i< 100_000; i++) { | |
data[i] = random.nextInt(); | |
} | |
int max = Integer.MIN_VALUE; | |
for (int x : data) { | |
max = Math.max(max, x); | |
} | |
System.out.println(max); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment