ClassNotFoundException {
嘗試{
file InputStream in = new file InputStream(//創建輸入流。
“E:\ \ 0326 Java \ \ javase \ \ src \ \ io \ \ testfile inputstream . Java“);
FileOutputStream out = new file outputstream(“E:\ \ 1 . txt“);//創建輸出流
int I = 0;
while((I = in . read())!= -1) {
system . out . print((char)I);//循環讀取文件數據
out.write(我);//將每個讀取的數據輸入1.txt
}
out . flush();
out . close();
} catch(file not found exception e ){
// TODO自動生成的catch塊
e . printstacktrace();
} catch(io exception e ){
// TODO自動生成的catch塊
e . printstacktrace();
}
}