trimspaces   program done and writefile implemented in myfile.java