You invoke
out.write(avg)
to write the int avg to the output.
This will invoke the method BufferedWriter.write(int)
; this will write out the character with the Unicode code point avg
. This is probably not what you want ;-).
To print the number avg
in decimal format, use
out.write(String.valueOf(avg))
sleske
2010-10-27 09:55:00