What are the different ways to store very large number in java? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

What are the different ways to store very large number in java?

7th Nov 2019, 4:54 PM
Rajesh Dehury
Rajesh Dehury - avatar
5 Réponses
+ 3
Check out BigInteger class.
7th Nov 2019, 5:01 PM
Avinesh
Avinesh - avatar
+ 1
Okay any other ways ?? I want to know how many ways ?
7th Nov 2019, 5:06 PM
Rajesh Dehury
Rajesh Dehury - avatar
0
Long and double(with decimals) are usually used.
7th Nov 2019, 5:08 PM
Avinesh
Avinesh - avatar
0
Bt incase their is a possibility to store a very large number then BigInteger is only way or any other ways are there.
7th Nov 2019, 5:10 PM
Rajesh Dehury
Rajesh Dehury - avatar
0
You could use arrays, or rather strings with digits from 0 to 9.
7th Nov 2019, 5:15 PM
Seb TheS
Seb TheS - avatar