---
title: "Discussion on \"Prime Number using Java\" | Hashnode"
description: "Discussion on \"Prime Number using Java\". import java.util.Scanner;\n\npublic class PrimeNumber {\n    static void checkPrime(int n)\n    {\n        int m= 0, flag = 0;\n        m = n /2;\n        if(n == 0 || n == 1)\n        {\n            System.out.println(n+\" is not Prime Number.\");\n        }\n  ..."
url: "https://hashnode.com/posts/prime-number-using-java/614715de17da986cea645b94"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Prime Number using Java](https://himanshu09.hashnode.dev/prime-number-using-java?utm_source=hashnode&utm_medium=feed)

import java.util.Scanner; public class PrimeNumber { static void checkPrime(int n) { int m= 0, flag = 0; m = n /2; if(n == 0 || n == 1) { System.out.println(n+" is not Prime Number."); } ...

Sep 19, 2021 · 1 min read · himanshu09.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)
-   [#coding](https://hashnode.com/tag/coding)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#challenge](https://hashnode.com/tag/challenge)

## Written by

[Himanshu Itankar](https://hashnode.com/@Himanshu09)

@Himanshu09 · Maharashtra, India

  
[View profile](https://hashnode.com/@Himanshu09)

Java Developer

Working as a Java Developer!

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
