About 805,000 results
Open links in new tab
  1. How to write a loop to display multiples of primes in Java?

    Jun 30, 2016 · Write a program that finds all of the prime numbers between one and some number that you allow the user to input. Find the prime numbers between 0 and the number …

  2. Java Program to Display Prime Numbers Between Two Intervals

    In this program, you'll learn to display prime numbers between two given intervals, low and high. You'll learn to do this using a while and a for loop in Java.

  3. Prime Number Program in Java - GeeksforGeeks

    Apr 7, 2025 · A prime number is a natural number greater than 1, divisible only by 1 and itself. Examples include 2, 3, 5, 7, and 11. These numbers have no other factors besides themselves …

  4. Prime numbers in a given range in Java | PrepInsta

    Here are few methods we’ll use to Find all the Prime Number in a Given Interval in Java Language. Method 1: Using inner loop Range as [2, number-1]. Method 2: Using inner loop …

  5. While Loop Print Prime Numbers In Java - JavaProgramTo.com

    Nov 10, 2020 · Java Program to print prime numbers using while loop. And also example to print prime numbers from 1 to 100 (1 to N)

  6. Java Program to Print Prime Numbers - W3Schools

    Unlock efficient methods for a prime number program in Java with this tutorial. Learn to check and print prime numbers up to any limit, from 1 to 100. Ideal for boosting your skills in prime …

  7. Prime Number Program in Java Using for Loop - Hero Vired

    Jan 17, 2025 · The simple program to check for a prime number is using the loops including for loop or while loop in Java. As we know there can’t be a divisor of number (n) greater than or …

  8. find prime number using while loop in java - Stack Overflow

    If our number isn't divisible by two then we don't have to test any even numbers. This is a very efficient way to test for prime numbers. boolean isPrime(int n) { for(int i=2;2*i<n;i++) { …

  9. Prime number in java using for loop - tutorialsinhand

    Given below is a java program to check if number is prime number or not. public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter …

  10. Java Program to Check Prime Number - Tutorial Gateway

    In this article, we will show you how to write a Java Program to Check Prime Number using For Loop, While Loop, and Functions.

Refresh