Update PrintPrimes.java

Combined the calculatePrimes and the calculateOddPrimes methods to simplify the code and combine similar functions