I came across this assignment while I was practicing
int I = '1'
I didn't understand how does it compile, can some please explain?
答案 0 :(得分:-2)
First of all char is numeric type so it contains the code of letter (UTF-16 code units).
Then we have conversion rules for various types. And this is widening primitive conversion.