package ltb20180106; public class FindPrime implements Runnable{ private int prime; private int q; private int w; public FindPrime(int nn,int mm) { q=nn; w=mm; } public void run() { getFindPrime(q,w); } public synchronized void getFindPrime(int min,i…
所谓素数就是指相邻两个奇数均为素数, 判断一个数是否为素数的基本方法是:(以n=5为例) package com.cdp.SuShu; public class sushujisuan { public static void main(String[] args) { // TODO Auto-generated method stub int n = 5; boolean flag = isPrime(n); System.out.println(isPrime(n)); } // 判断一个…