Folder making and merging files coderinme

folder making and merging files.what do you know about it?

File Handling using Java

Here we start folder making and merging files.
here we are doing only 2 things.
first we are reading one line.
from the file and then writing into another file.

lets’s do it

folder making and merging files
import java.io.*;
package Calculation;

public class File_reader {
	public static void main(String [] args)throws IOException{

	BufferedReader in= new BufferedReader(new FileReader("inputsrc\\inp.txt"));

	PrintWriter out= new PrintWriter(new FileWriter("outputsrc\\output.txt")) ;

	String s=in.readLine();
	while (s != null)
	{
		out.println(s);
	s=in.readLine();
	}
	in.close();
	out.close();
}
	}

img_code
another file handler

Leave a reply:

Your email address will not be published.