What is the problem? ".00"? If you donβt need it, why use Double?
You can try like this ...
String l1="11352721345377306"; String l2="11352721346734307"; String l3="11352721346734308"; String l4="11352721346734309"; Double d1 = Double.parseDouble(l1); Double d2 = Double.parseDouble(l2); Double d3 = Double.parseDouble(l3); Double d4 = Double.parseDouble(l4); System.out.println(d1.longValue()); System.out.println(d2.longValue()); System.out.println(d3.longValue()); System.out.println(d4.longValue());
Modify using BigDecimal to get the correct values:
String l1="11352721345377306"; String l2="11352721346734307"; String l3="11352721346734308"; String l4="11352721346734309"; BigDecimal bd1 = new BigDecimal(l1); BigDecimal bd2 = new BigDecimal(l2); BigDecimal bd3 = new BigDecimal(l3); BigDecimal bd4 = new BigDecimal(l4); System.out.println(bd1); System.out.println(bd2); System.out.println(bd3); System.out.println(bd4);
Output:
11352721345377306 11352721346734307 11352721346734308 11352721346734309
source share