In the course of the program, the program will receive at the input the number 9999683411343521124 of which type it is better to make a variable into which this number will be written?

    1 answer 1

    Depends on the specifics of the problem. BigInteger or perhaps just a String .

    • In general, this is just a class instance instance. So I think, with what is better to work - String or BigInteger - Stas0n
    • Then explain the specifics of the problem. What operations are you going to apply to your numbers? - VladD
    • In general, nothing special - just use the number as an ID, i.e. get the object by this ID - Stas0n
    • @ Stas0n: Then the line on the idea should be enough for the eyes. - VladD
    • Yes, I also think ... - Stas0n