When i am trying to write ArrayList to TextFile , only half of the content of the ArrayList is being written to the File .
Where as all the content of the ArrayList is being properly printed when i use system.out.println(list.get(i))
Avoid using "\n" to write new lines in a file as this won't work for all OS's. Regardless, you may be having problems from not flushing or closing the FileWriter, but with the small bit of code posted, I don't know for sure.
Myself, I'd wrap that FileWriter in a PrintWriter object, one that I've turned auto-line flushing on (check out its constructors in the API) and then do a println for each line I wish to write. You may wish to give this a try. Your mileage may vary. Luck!