Hi there,
are there any issues with isProbablePrime method of the BigInteger
class? I get this realy weired error:
Primes.java:23: Type expected.
                if (start.isProbablePrime(ERR_VAL))

in this code

/* code */

        private static final int ERR_VAL        = 100;

/* more code */

        public static BigInteger NextPrime(BigInteger start)
        {
                if (isEven(start))
                        start = start.add(ONE);
                else
                        start = start.add(TWO);

                if (start.isProbablePrime(ERR_VAL))
                        return (start);
                else
                        return (NextPrime(start));
        }

        private static boolean isEven(BigInteger num)
        {
                return (num.mod(TWO).equals(ZERO));
        }

Can some one tell me what is going on? I am just follwoing the example
from "Core Servlets and ..." book.
Thanks in advance
-r

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to