pascalchidi
03/04/2021, 9:57 PMephemient
03/04/2021, 10:10 PMCasey Brooks
03/04/2021, 10:11 PM16L
is not the same as the String "000016"
. Once a String is parsed to Long ("000016".toLong()
) all you have left is the raw 64-bit representation of that number in memory, there’s no reason it should print with 4 leading zeros at that point. You’ll have to format that number with String.format
, or manually pad the default String representation (.toString().padStart(6, '0')
)