i have no problem with the following code . I am giving the code bellow. please check it out .
import java.io.*;
class ashik45{
public ashik45(){
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
String name=new String();
String id=new String();
try{
FileWriter fw=new FileWriter("ashik40.txt");
//BufferedWriter bw=new BufferedWriter(fw); //this line has no effect on the code . why ? .what does the code means ?
System.out.println("please enter your name");
name=bf.readLine();
System.out.println("please enter your id");
id=bf.readLine();
fw.write(name);
fw.write(id);
fw.close();
System.out.println("your data has saved successfully");
}
catch(IOException ioe){
System.out.println("io exception is found");
}
}
public static void main(String args[]){
new ashik45();
}
}
Compile
Started by
ashikmon
, Jun 13 2012 05:45 PM
2 replies to this topic
#1
Posted 13 June 2012 - 05:45 PM
#2
Posted 14 June 2012 - 03:19 AM
ashikmon, on 13 June 2012 - 05:45 PM, said:
i have no problem with the following code . I am giving the code bellow. please check it out .
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
FileWriter fw=new FileWriter("ashik40.txt");
//BufferedWriter bw=new BufferedWriter(fw); //this line has no effect on the code . why ? .what does the code means ?
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
FileWriter fw=new FileWriter("ashik40.txt");
//BufferedWriter bw=new BufferedWriter(fw); //this line has no effect on the code . why ? .what does the code means ?
BufferedWriter:
http://docs.oracle.c...eredWriter.html
#3
Posted 25 June 2012 - 02:46 AM
What you said it is very difficult.I have no idea.
Every journey begins with the first step










