你能解释一下最后 2 个打印语句的内容吗?那就是我迷路的地方。
public class Something
{
public static void main(String[] args){
char whatever = '\u0041';
System.out.println( '\u0041'); //prints A as expected
System.out.println(++whatever); //prints B as expected
System.out.println('\u0041' + 1); //prints 66 I understand the unicode of 1 adds up the
//unicode representing 66 but why am I even returning an integer when in the previous statement I returned a char?
System.out.println('\u0041' + 'A'); //prints 130 I just wanted to show that adding an
//integer to the unicode in the previous print statement is not implicit casting because
//here I add a char which does not implicitly cast char on the returned value
}
}