Java Reference
In-Depth Information
Note
BigInteger
also declares several bit-oriented methods, such as
BigIn-
teger
and
(BigInteger val)
,
BigInteger flipBit(int n)
, and
BigInteger shiftLeft(int n)
.Thesemethodsareusefulforwhenyouneed
to perform low-level bit manipulation.
this class in a
factorial()
method comparison context.
Listing 4-33.
Comparing
factorial()
methods
import java.math.BigInteger;
class FactComp