正确格式:
public static void main(String[] args) throws IOException {
FileInputStream fi = new FileInputStream("test.txt");
int by;
while ((by = fi.read()) != -1) {
System.out.print((char) by);
}
fi.close();
}
微信扫一扫
public static void main(String[] args) throws IOException {
FileInputStream fi = new FileInputStream("test.txt");
int by;
while ((by = fi.read()) != -1) {
System.out.print((char) by);
}
fi.close();
}
相关推荐