How to add two numbers of any length in java?
问题 How to add two numbers of any length in java? Say for example, in java long size is 64 bit. So the maximum range is -9223372036854775808 to 9223372036854775807. Am i right? So if we want to add a number which is greater than this like below, i got a error " Integer Number too large" long a = 9223372036854775807L; long b = 9223372036854775808L; In C, we can take those numbers as char array, by traversing through the address of each char and use some data structure, we can add two numbers of