So for some reason compiler keeps saying that the "input" is never closed. However, the program runs and executes. I just want to know why it keeps saying it. Here is the syntax. Thanks in advance.
import java.util.Scanner;
public class Problem1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter three numbers: ");
int N1 = input.nextInt();
int N2 = input.nextInt();
int N3 = input.nextInt();
DoSort(N1, N2, N3);
}
public static void DoSort(int N1, int N2, int N3){
if ((N1 < N2) && (N2 < N3)){
System.out.println("The acsending order is " + N1 + " " + N2 + " " + N3);
}
if ((N1 > N2) && (N2 > N3)){
System.out.println("The acsending order is " + N3 + " " + N2 + " " + N1);
}
if ((N1 < N2) && (N2 > N3) && (N1 < N3)){
System.out.println("The acsending order is " + N1 + " " + N3 + " " + N2);
}
if ((N1 < N2) && (N2 > N3) && (N1 > N3)){
System.out.println("The acsending order is " + N3 + " " + N1 + " " + N2);
}
}
}