[i=s] 本帖最后由 lijiang 于 2015-1-5 22:45 编辑 [/i]
import java.io.*;
public class Stream{
public static void main(String args[]) throws IOException{
FileInputStream in= new FileInputStream("/home/dell/TURBOC2/BGIDEMO.C");
FileOutputStream out= new FileOutputStream("/home/dell/java-src/BGIDEMO.txt");
int c;
while((c=in.read())!=-1)
out.write(c);
in.close();
out.close();
}
}
[attach]41809[/attach]
用javac编译并用java虚拟机运行:
[attach]41811[/attach]
生成的文件:
[attach]41810[/attach]
让我们认真学习先进的java语言吧!
videoout 于 2015-01-06 09:02:16发表:
学习学习