I am making an array that generates random numbers from 1-100. Then, at the end, I will output the max and min numbers from the list. However, I don't know exactly how to find / call upon the max and min numbers I've tried using the math method functions like Math.min() but I don't think it works for arrays. Here's my code (the underscores is where I thought I'd call in the max and min numbers but I don't know how to).
public class MaxMin {
public static void main(String[] args) {
int max = 0;
int min = 0;
int hold = 0;
System.out.println("#" + "\t\t" + "Number");
int[][] numberArray= new int [10][1];
for(int i=0;i<10;i++)
{
System.out.print((i+1)+"\t\t");
for(int j=0;j<1;j++)
{
numberArray[i][j] = (int)(Math.random()*100)+1;
System.out.print(numberArray[i][j] + "\t\t");
}
System.out.println();
}
System.out.println("Max: " + "\t\t" + ______);
System.out.println("Min: " + "\t\t" + ______);
}
}