File Output Streams-2
File Output Streams-2
Explanation:
1) Line import java.io.FileOutputStream; imports the
FileOutputStream class that will help us in writing data to
a file.
2) Line fout=new FileOutputStream("e:\\testout1.txt"); create
object fout of above class and open a new file testout1.txt
on drive E for writing data.
3) The method fout.write(65); will write character A to a file.
Note that 65 is the ASCII code for character A.
4) The method fout.close(); saves the file and close it.
Welcome to Java.
Java is better than c and c++.
Java is pure OOP Language.