When i am taking mul*tab<=1000002 , it is not print anything

//when i am taking multab<=1000002 in second for loop inside prime function , it is not print //anything
import java.util.
;
public class Main {
public static void prime(boolean arr[]){

		Arrays.fill(arr,true);
		arr[0]=false;
		arr[1]=false;
		for(int tab=2;tab*tab<=1000002;tab++){
			if(arr[tab]){
				for(int mul=2;mul*tab<1000002;mul++){
					arr[tab*mul]=false;
				}
			}
		}
	//return arr;

}
public static void main(String args[]) {
	try{
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		boolean arr[]= new boolean[1000002];
	//	arr=prime(arr);
		prime(arr);
		while(n-->0){
		int a=sc.nextInt();
		int b=sc.nextInt();
	

		int count=0;
		for(int i=a;i<=b;i++){
			if(arr[i])
			count++;

		}
		//System.out.println("HELLO");
		System.out.println(count);
	
		}


	}
	catch(Exception e ){

	}

}

}

hey @Vipin_coder
it is Printing
try for this input :
2
1 10 11 20
You are not taking the correct input may be

have you change the code??
when i am taking mul *tab<=1000002 in second for loop inside prime function ,

Question : have you change the code??
Answer: Nope

import java.util. ;
public class Main {
public static void prime(boolean arr[]){

		Arrays.fill(arr,true);
		arr[0]=false;
		arr[1]=false;
		for(int tab=2;tab*tab<=1000002;tab++){
			if(arr[tab]){
				for(int mul=2;mul*tab<=1000002;mul++){
					arr[tab*mul]=false;
				}
			}
		}
	//return arr;

}
public static void main(String args[]) {
	try{
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		boolean arr[]= new boolean[1000002];
	//	arr=prime(arr);
		prime(arr);
		while(n-->0){
		int a=sc.nextInt();
		int b=sc.nextInt();
	

		int count=0;
		for(int i=a;i<=b;i++){
			if(arr[i])
			count++;

		}
		//System.out.println("HELLO");
		System.out.println(count);
	
		}


	}
	catch(Exception e ){

	}

}

}

so , you have not read my question completely.
I changed the code, correct me , if i m wrong.

here Size of array is 1000002 .
last index of array is 1000001.
If you remove the Try Catch Block.
its gives ArrayIndexOutOfBoundsException:
for(int mul=2;mul*tab< 1000002;mul++) // its correct

okay, Thank you got it