01 class ArgumentOutOfBoundException extends Exception
02  {
03    }04  class JSlo
05   {
06 boolean s;
07 boolean prime(int n) throws ArgumentOutOfBoundException
08 {
09
10 if(n<=0)
11 {
12 throw new ArgumentOutOfBoundException();
13 }
14 if(n<3)
15 {
16  s=true;
17 }
18 for(int i=2;i<Math.sqrt(n);i++)
19 {
20 if(n%i==0)
21 {
22 s=false;
23 break;
24 }
25
26 }
27 return s;
28 }
29      }
30     public class lx12_14
31      {
32 public static void main(String args[])
33 {
34 JSlo cir=new JSlo();
35 try
36 {
37
38 System.out.println(cir.prime(1));
39      
40 }
41 catch(ArgumentOutOfBoundException e)
42 {
43 System.out.println(e+"数值小于0");
44 }
45 }
46     }  为什么都是打印出false呢?请帮帮看看程式,谢谢!!