I am making a program that finds the min/max numbers in a java array. I am currently stuck at the last part which is finding the min/max. I have currently setup all other parts of the program. This is my code.
import java.util.Scanner;
public class X {
public static void main (String[] args) {
Scanner input= new Scanner(System.in);
System.out.println("Enter size of array");
int n= input.nextInt();
int[] x= new int[n];
System.out.println("Enter Array nums");
for(int i=0;i<n;i++){
x[i]= input.nextInt();
}}}