Java program to find number of prime numbers in a subarray and performing updates
import java . io . * ; import java . util . * ; class GFG { static int MAX = 1000 ; static void sieveOfEratosthenes ( boolean isPrime [ ] ) { isPrime [ 1 ] = false ; for ( int p = 2 ; p * p <= MAX ; p ++ ) {