顶了 ~~~~~~~~~~~~~~
import java.io.*;
public class test5{
public static void main(String[] xiang){
byte[] b1=new byte[322];
byte[] b2=new byte[322];
byte[] b3=new byte[3212];
byte[] b4=new byte[3212];
try{
System.out.println("请输入源文件名称:");
System.in.read(b1,0,322);
System.out.println("请输入目的文件名称:");
System.in.read(b2,0,322);
String sourceName=new String(b1,0);
String desName=new String(b2,0);
FileInputStream fileInput=new FileInputStream(sourceName);
int bytes1=fileInput.read(b3,0,3212);
String sourceFile=new String(b3,0,0,bytes1);
FileOutputStream FileOutput=new FileOutputStream(desName);
FileOutput.write(b3,0,bytes1);
fileInput=new FileInputStream(desName);
int bytes2=fileInput.read(b4,0,3212);
String desFile=new String(b4,0,0,bytes2);
System.out.println("\n源文件内容为:\n");
System.out.println(sourceFile);
System.out.println("\n目的文件内容为:\n");
System.out.println(desFile);
}catch(Exception e){
System.out.println(e.toString());
}
}}
我问你一个问题行不,为什么我用JDK1.5.0_9运生它的时候,出现:test5.java使用或覆盖了已过时的API。注意:要了解详细信息,请使用-Xlint:deprecation重新编译。