public class PrintWriterDemo {
public static void main(String[] args) throws IOException{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(new FileWriter("E:\\a.txt"),true);
String len = null;
while((len=buf.readLine())!=null){
pw.println(len);
}
pw.close();
buf.close();
}
}
public class PrintStreamDemo {
public static void main(String[] args) throws IOException{
FileReader fr = new FileReader("E:\\a.txt");
BufferedReader buf = new BufferedReader(fr);
PrintStream ps = new PrintStream("E:\\aa.txt");
public static void main(String[] args) {
BufferedReader buf = new BufferedReader(
new InputStreamReader(System.in));
OutputStreamWriter out = null;
String len = null;
try {
out = new OutputStreamWriter(new FileOutputStream("E:\\a.txt"));
len = buf.readLine();
out.write(len);
out.flush();
} catch (IOException e) {