/* You are given a class Solution and its main method in the editor. Your task is to create a class Prime which contains a single method checkPrime so that the code prints only prime numbers as the output. Please do not use method overloading! Input Format There are only five lines of input, each containing one integer. Output Format There will be only four lines of output. Each line contains only prime numbers depending upon the parameters passed to checkPrime in the main method of the class Solution. In case there is no prime number, then a blank line should be printed. */ import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.lang.reflect.*; import static java.lang.System.in; class Prime { public void checkPrime(int ... n) { for (int j=0;j set=new HashSet<>(); boolean overload=false; for(int i=0;i