Error in line 26 Occure why or that loop why occuring error

import java.util.*;
public class A {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);

//prime Sieve Algo

int[] arr = new int[100000];


for(int i=3;i<=100000;i+=2){// odd number 1
  arr[i] = 1;
}

for(int i=3;i<100000;i+=2){
  
  if(arr[i] == 1){
    System.out.println(i);
    for (int j=i*i;j < 100000 ; j = j+i) {
      arr[j] = 0 ;
    }


  }

}

  arr[0] = 0;
  arr[1] = 1;
  arr[2] = 1;


  // for (int temp :arr ) {
  //   System.out.print(temp+" ");
  // }


  int start =sc.nextInt();
  int end = sc.nextInt(); 
  int count =0;

    for(int i=start;i<end;i++){
      if(arr[i] == 1){
        count++;
      }
  }
System.out.println(count+" ");

}
}

hey @amankumar7017 java.lang.ArrayIndexOutOfBoundsException
Index -2146737495 out of bounds for length 100000
read this line carefully First line contains a single integer denoting the number of test cases
You need to print 10 ^ 6 prime, the size of array will increase


updated code