package help; /** * This is a tool class that can operate on arrays, which provides the function of getting the most value * @author zaiji * @version V1.1 * */ public class help { /** * empty parameter constructor * */ private help() { } /** * Get the maximum value in an integer array. * @param arr accepts an array of type int. * @return returns the largest value in the array. * */ public static int getMax(int[] arr) { int max = 0; for (int x = 1; x < arr.length; x++) { if (arr[x] > arr[max]) max = x; } return arr[max]; } /** * Get the smallest value in an integer array. * @param arr accepts an array of type int. * @return returns the smallest value in the array. * */ public static int getMin(int[] arr) { int min = 0; for (int x = 1; x < arr.length; x++) { if (arr[x] < arr[min]) min = x; } return arr[min]; } }
after playing
File => Export => java => javadoc
Click next
Then finish or Next, change other options.
After the end, it will be in your storage path
Open help.html to see the help documentation
-------------------------By chick