关于数据类型的转换
public class IsrAndOswDemo {
public static void main(String[] args)throws IOException {
FileInputStream in = new FileInputStream("e:\\java\\wenzi.txt");
InputStreamReader isr = new InputStreamReader(in);//默认项目的编码
int c;
while((c=isr.read())!=-1){
System.out.print(c);
}
}
请问大神,这段代码里面将int c改为char c为什么会报错,c=isr.read()这里返回的不是char类型的吗