Java Program to Print First 10 Prime Numbers

By: Prem Tiwari | Last Updated: | In: Java Tutorial


This is a very simple Java program to print first 10 prime numbers. If you are a Java beginners or want to start learning Java programming language, then this program will help you to understand the basic Java programming. In this post, I will explain about a Java program to print first 10 prime numbers …

Prime Number Program in Java

By: Prem Tiwari | Last Updated: | In: Java Tutorial


This is a simple Java program to find the prime number. A prime number is a number which is greater than 1 and only divisible by 1 or itself. Following is the first 10 prime numbers:

Prime Number Program in Java In this program, I have taken number as variable to hold the number …