I\'ve been searching around for quite a while, and I\'ve found almost nothing on how BigInteger actually holds its numbers. Are they an array of chars? Somethin
With an int[]
From the source:
/**
* The magnitude of this BigInteger, in big-endian order: the
* zeroth element of this array is the most-significant int of the
* magnitude. The magnitude must be "minimal" in that the most-significant
* int ({@code mag[0]}) must be non-zero. This is necessary to
* ensure that there is exactly one representation for each BigInteger
* value. Note that this implies that the BigInteger zero has a
* zero-length mag array.
*/
final int[] mag;