By Anshuman Pattnaik
Note: You can find the address of the txt file in C:/ drive using:
C:\Users\*your user name*\ready\Names.txt
CODING
import java.io.*;
class File
{
public static void main(String args[])throws IOException
{
BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
FileWriter fw= new FileWriter ("Names.txt");
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter pw = new PrintWriter(bw);
int i;
String nm;
System.out.println("Welcome to text Editor [DEMO]------BY ANSHUMAN PATTNAIK-----");
nm=br.readLine();
pw.println(nm);
pw.close();
}
}
RESULT:
| Note the related coding , found at here |


0 Comments
Please follow the moderation policy before writing annotations