program to find max element in an array by user inpur in java code example Example: how to find the largest integer in java int a = Integer.MAX_VALUE;