标签: java char int
我想知道为什么在Java中有些工作,而有些却没有。最后一个出现“必需的字符,发现int”错误。
int n = 5; char c = 'A'; //works ok c++; //works ok c += n; //works ok c += 5 - n; //works ok c = 15 + 65; //works ok c = 5 + n; //doesn't work c = c + 1; //doesn't work