最後の 2 つの print ステートメントで何が起こっているのか説明していただけますか? それが私が迷子になるところです。
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
}
}