j_echo.java
来自「一个十分好的java基础学习的课件」· Java 代码 · 共 41 行
JAVA
41 行
// ////////////////////////////////////////////////////////
//
// J_Echo.java
//
// ////////////////////////////////////////////////////////
import java.io.InputStream;
import java.io.IOException;
public class J_Echo
{
public static void mb_echo(InputStream in)
{
try
{
while (true) // Read input and echo
{
int i = in.read( );
if (i == -1)
return;
char c = (char) i;
System.out.print(c);
} // End of loop: while
}
catch (IOException e)
{
System.err.println(e);
} // End of try/catch structure
System.out.println( );
} // End of method: mb_echo
public static void main(String args[])
{
mb_echo(System.in);
} // End of method: main
} // End of class: J_Echo
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?