Check out example codes for "java convert string with commas to long". It will help you in understanding the concepts better.

Code Example 1

Long maxValue = Long.valueOf(str.replace(",","")); // convierte el string 123,1246,125 al Long 1231246125

Learn ReactJs, React Native from akashmittal.com