Use %d for decimal places (long, int). It is working fine. For example:
System.err.println(String.format("%d", 193874120937489387L));
... will print just fine. Read java.util.Formatter details. %d will accept long , no problem.
Stu Thompson Jan 6 2018-10-06T00: 00Z
source share