📄 j_example.java
字号:
// ////////////////////////////////////////////////////////
//
// J_Example.java
//
// ////////////////////////////////////////////////////////
import java.io.FileInputStream;
public class J_Example
{
public static void main(String args[])
{
int i;
int b;
try
{
FileInputStream f =new FileInputStream("test.txt");
b=f.read( );
for (i=0; b!=-1; i++)
{
System.out.print((char)b);
b=f.read( );
}
System.out.println( );
System.out.println("TOTAL="+i);
f.close( );
}
catch(Exception e)
{
System.out.println(e);
} // End of try/catch structure.
} // End of method: main
} // End of class: J_Example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -