?? exam12_3.java
字號:
/* 程序名Exam12_3.java*/
import java.io.*;
public class Exam12_3
{
public static void main(String [] args)
{
byte byteArray[]=new byte[128]; //定義字節數組
DataOutputStream out=new DataOutputStream(System.out);
try //捕獲I/O錯誤
{
FileInputStream data=new FileInputStream("Exam12_1.java");//創建對象
int n=data.read(byteArray); //從文件中輸入字節數據放入數組中
while(n!=-1)
{
out.write(byteArray,0,n); //將字節數組寫入流中
n=data.read(byteArray); //從文件中輸入字節數據放入數組中
}
}
catch(IOException e)
{
System.out.println(e.toString()); //輸出出錯信息
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -