回答第四:
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class CopyBytes {
public static void main(String[] args) throws IOException {
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream("test1.txt");
out = new FileOutputStream("test2.txt");
int c;
while ((c = in.read()) != -1) {
out.write(c);
}
} finally {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
}
}
int a=97;
int i=0;
for(i=a;i<123;i+=2){
System.out.print((char)i+" ");
}
i-=1;
for(int j=i;i>97;i-=2){
System.out.print((char)i+" ");
}