Closed lcunild closed 4 years ago
What is the difference between digits and n.digits in the LongInteger class? In L7 of the implementation of addSameSign() in the textbook, what is being compared by the Math.max function?
int m = Math.max(digits.length, n.digits.length);
public class LongInteger extends SignedNumeral<LongInteger> { /** The values of this integer (excluding the sign). */ protected byte[] digits; ...
digits is the member field of Class LongInteger.
digits
LongInteger
What is the difference between digits and n.digits in the LongInteger class? In L7 of the implementation of addSameSign() in the textbook, what is being compared by the Math.max function?
int m = Math.max(digits.length, n.digits.length);