Assuming
FileInputStream in=new FileInputStream ("file.txt");
char c=in.read();
Gives me an error:
java: incompatible types: possible lossy conversion from int to char
, but
char b=87;
Does not give me any error,rather it gives me the Unicode character
- why does char c variable gives an error since
in.read()
returns an int value that can be a Unicode character but char b variable doesn't?