I am creating the word doc file using java io package
You can't create a DOC file using the java.io package. It's a bit hard to tell, but it looks like you're creating a tab-delimited flat file - text files have no concept of styles at all.
You will either have to use an API that can create DOC files -like the Apache POI library-, or resort to some other solution. One option would be to create an RTF file, which is a text file and can be created much easier than a DOC file.
subject: How to set the text in bold in word file using java