请教java题目

来源:百度知道 编辑:UC知道 时间:2024/06/01 04:19:18
歌德巴赫猜想,任何一个大于六的偶数可以拆分成两个质数的和
打印出所有的可能
请解释解释。谢谢

public class Test40{
public static boolean primeNum(int i){
for(int j=2;j<Math.sqrt(i);j++)
if(i%j==0) return false;
return true;
}
public static void main(String[] args) throws Exception{
if(args.length<1)
System.out.println("Usage:A very easy programe!");
int a=0;
try{
a=Integer.parseInt(args[0]);
}catch(ArrayIndexOutOfBoundsException e){
System.out.println("Warning:No command line arguments!");
}catch(NumberFormatException e){
System.out.println("Please enter a number!");
}