difference between convert char to int and char to byte

后端 未结 0 1296
南方客
南方客 2021-01-17 16:05

I\'m new to Java and I learned that char in java is actually int, so we can do

char c = \'a\';
int i = c; // i =97, which is the ascii index of letter "c         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题