The maximum value of Long depends on the number of digits of Long, and the higher the number of digits, the larger the range. Long is a data type, and the maximum value depends on the number of digits of long. The higher the number of digits, the larger the range of representation, because the number of digits of long integers determines the precision and range of values that can be stored.
The maximum value of a long integer = 2 (digits-1)- 1, where digits represent digits of a long integer. For example, if the long integer is 32 bits, the maximum value is 2 3 1- 1.