Could tell me wath's wrong with my simple code of the problem Prime1???

import java.util.Scanner;

class ACM_Primes {

public static void main(String[] args) {

    Scanner ler = new Scanner (System.in);
    int n = ler.nextInt();
    for (int a = 1; a <= n; a++) {
        int x = ler.nextInt();
        int y = ler.nextInt();
    
        for (int i = x ; i <= y ; i++) {
            if(i < 10) {
                byte div = 0;
                for (int j = 1 ; j <= 9 ; j++) {
                    if(i % j == 0)
                        div++;
                    if(div > 2)
                        break;
                }
                if(div == 2) 
                    System.out.println(i);
            
            }
        
            else {
                boolean prime = true;
                for (int j = 2 ; j <= 9 ; j++) {
                    if(i % j == 0)
                        prime = false;
                    if(!prime)
                        break;
                }
                if(prime) 
                    System.out.println(i);
            
            }
        }
        System.out.println();
    }
}

}

You assume that each non-prime number has a divisor that is smaller than 10. This doesn’t have to be the case. Just look at 121 = 11 \cdot 11.

Question link please.