The following code gives only two outputs:(2 and 3),after this it gets terminated.
package for_loop;
import java.util.Scanner;
public class PrimeSeries {