在输入流当中,看到老师演示的例成功了,,自己照抄运行竟然这样.哪里错了?
import java.io.*;
class FileReaderDemo
{
public static void main (String[] args)throws IOException
{
FileReader fw = new FileReader("demo.text");
while(true);
{
int ch = fw.read();
if( ch==-1 )
break;
System.out.println("ch="+(char)ch);
}
fw.close();
|
|