java convert string with commas to long

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

Also in Java: