Finding minimum and maximum of 'n' numbers...please help!

So I am new to programming and I am sorry if I am posting this is the wrong spot also. :o Hopefully someone will be able to help me figure out my problem! My problem is that I do not know how to find the minimum and maximum of 'n' numbers using and array or loop. The program is supposed to find the minimum, maximum, and average of 'n' number of test scores. I found out how to do the average but not the minimum of maximum. Here is my program so far:

import java.util.Scanner;

public class TestScores {

// the number of tests

final static int NUM_TESTS = 10;

public static void main(String[] args){

Scanner input = new Scanner(System.in);

// input the number of tests

System.out.print("Enter the Number of Tests: ");

int numberOfTests = input.nextInt();

// initializing the loop

int testScore;

int total = 0;

int i = 1;

while (i <= numberOfTests){

// input test scores

System.out.print("Enter Next Test Score: ");

testScore = input.nextInt();

total = total + testScore;

++i;

}

// calculate the average score

double testAverage = total / numberOfTests;

// output the minimum, maximum, and average score

System.out.println("Test Minimum: " );

System.out.println("Test Maximum: " );

System.out.println("Test Average: " + testAverage);

}

}