Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Find the maximum integer */
- public static int findMax(int[] numbers) {
- int max = numbers[0];
- for (int i = 1; i < numbers.length; i++) {
- if (numbers[i] > max) {
- max = numbers[i];
- }
- }
- return max;
- }
Advertisement
Add Comment
Please, Sign In to add comment