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.