📄 filedemo8.java
字号:
/**
*Another simple file demostration program
*Reads the source code from the disk and displays the code on the screen
*/
import java.io.*;
class fileDemo8
{
public static void main(String args[]) throws IOException
{
byte[] b = new byte[800];
FileInputStream fin = new FileInputStream("fileDemo8.java");
int bytes = fin.read(b,0,800);
String str = new String(b,0,bytes);
/*-------------------------------------------------------------------------------
public String(byte[] bytes, int start, int count)
This constructor creates a new String,which value equals to the String from
the "start" location in the "byte[]",and lasts for "count" characters
-------------------------------------------------------------------------------*/
System.out.println(str);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -