Subject: Re: problem with homework

From: Chee Yap <[email-masked]>
Date: Wed, 10 Nov 1999 08:25:16 -0500 (EST)

Joaquin:

You can access these static fields using
	BigInteger.ZERO
	BigInteger.ONE

Also, if you compare, do not directly compare

	if (BigInteger.ONE == mynum) ...

But be sure to do

	if (mynum.equals(BigInteger.ONE)) ...

or something similar.

Chee

> From [email-masked] Tue Nov  9 19:37 EST 1999
> X-Authentication-Warning: cs.nyu.edu: majordom set sender to [email-masked] using -f
> Date: Tue, 09 Nov 1999 19:32:47 -0500
> From: Joaquin Grech <[email-masked]>
> X-Accept-Language: en
> To: basic algorithm <[email-masked]>
> Subject: problem with homework
> 
> Hi!
> 
> mult.java:15: Undefined variable: ZERO
>                    return ZERO;
>                           ^
> mult.java:16: Undefined variable: ONE
>                 if (n1.equals(ONE))
> 
> any ideas? I thought ZERO and ONE where defined in the imported package :??
> do I have to declare them somewhere? those are the only errors I get :??
> 
> Joaquin Grech
> 
> --
> ---------------------------------------------------------------
> !     C r e a t i v i t y     M u s t    S u r v i v e        !
> ---------------------------------------------------------------
> !  Fido: 2:341/19.67                 Euronet: 25:928/100.67   !
> !  Internet: [email-masked]                            !
> !  Http://www.creative1.net                 Ya me direis :)   !
> ---------------------------------------------------------------
> 
> 
>