A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself i.e it is divisible by one and itself. As of January 2014, the largest known prime number is 257,885,161 -1, a number with 17,425,170 digits. Below is the simple java program which will print the prime numbers upto the limit provided.