实现从文件中一次读出一个字符的操作

public class FileFiterOperation {
	public static void main(String[] args) throws Exception {
		BufferedReader reader = new BufferedReader(new FileReader(
				"D:\\java\\Tank.java"));
		int ch;
		while ((ch = reader.read()) > 0) {
			System.out.println((char) ch);
		}
	}
}

你可能感兴趣的:(java)