

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























Mohammed Husain Bohara
abc.txt Java Application xyz.txt
read
write
import java.io.*;
class FileIOExample
{
public static void main(String[] args) throws FileNotFoundException, IOException { FileInputStream fis = new FileInputStream("abc.txt"); FileOutputStream fos = new FileOutputStream("xyz.txt"); int c; while((c=fis.read())!=-1) { System.out.println(c); fos.write(c); } fis.close(); fos.close(); }
}