char and byte with final access modifier - java
问题 Please take a look at below example i cant understand the relation between char and byte byte b = 1; char c = 2; c = b; // line 1 Give me compilation Error because c is type of char and b is type of byte so casting is must in such condition but now the tweest here is when i run below code final byte b = 1; char c = 2; c = b; // line 2 line 2 compile successfully it doesn't need any casting at all so my question is why char c behave different when i use final access modifier with byte 回答1: