Forums Register Login

leading zero in String

+Pie Number of slices to send: Send
I have a string which has a zero in the beginning.
For example 01254.
When I write it into a file using BufferedWriter the 0 in the beginning is dropeed and onlu 1254 is written.
How can I write the whole 01254 in the file.
Any help will be highly appreciated.
+Pie Number of slices to send: Send
Which method of the BufferedWriter are you using? How are you getting 01245 into the String in the first place?
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 814 times.
Similar Threads
add text to a .txt file
Math.rint() and seek()
string manipulation
searching for "\d*" in a string
Write an XML file with SAX?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:34:15.