hello, my problem is that I want an int with leading zeros, e.g. 0065 instead of 65. I found a code for this. i can be any number.
my problem is that this code makes a string so I made this:
Here is that the zeros are away. Any suggestions? (I need the variable i later so it is important that this is an int)
String formatted = String.format("%04d", i); System.out.println(formatted);
String formatted = String.format("%04d", i); i = Integer.valueOf(formatted); System.out.println(i);