Challenge problem

My code is :
import java.util.*;

public class Main {

public static void main(String args[]) {
			Scanner scn = new Scanner(System.in);
	int x = scn.nextInt();
	int N = scn.nextInt();
	if (x >= 1 && N <= 100000) {
		int i;
		int[] arr = new int[N];
		int tmp;
		for (i = 0; i < arr.length; i++) {
			tmp = scn.nextInt();
			if (tmp <= 100) {
				arr[i] = tmp;
			}
		}
		for (i = 0; i < arr.length; i++) {
			if (arr[i] >= x) {
				String name = scn.nextLine();
				System.out.println(name + " " + arr[i]);
			}
		}
	}
}

}
What is wrong can anyone tell me?

@VinayakSingh11111 bro you yourself said you haven’t learned about strings yet! you don’t only have to print the name and salary there is also a sorting part you have to do, for that you need study strings and comparator and it will be easy after you study oops.

So first patiently study about the concepts and move to this question.

If your query is resolved mark it resolve then!

And in user input test cases you don’t have to include constraints also!