-5

How to decide number accuracy ? I am getting number accuracy from given string value Example: 1202222 -------->>>> 1.202.222. First value are rendering to page 1.202.222

Using number accuracy

Best,

BG

user1360797
  • 41
  • 2
  • 7

1 Answers1

2

Integer.parse will give you 32-bit signed (about -4x10^9 to 4x10^9). Long.parse will give you 64-bit signed (about -1x10^19 to 1x10^19). BigInteger.parse will give you unlimited range. Only use BigInteger if you are sure you need to handle numbers bigger than long because it is much, much slower and uses methods like add() instead of operators like +. You should rarely need it.

John Watts
  • 8,717
  • 1
  • 31
  • 35