No. You haven't been following the discussion. We have already concluded that you don't actually need to check whether a factor is prime, to the printPrime method can be replaced by a print call. And reverting to a value of 2 is unnecessary.
Originally posted by Anoobkumar Padmanabhan:
Just look at this program. will this satisfies the issues?