运行以下代码:
int x=10;
If(x!=10)
System.out.println("x=" + x);
System.out.println("x+1=" + ( x + 1 ));运行结果是
x=10
x+1=11x=10x+1=11什么都不打印
字符串加法,按优先级进行计算。
运行以下代码:
int x=10;
If(x!=10)
System.out.println("x=" + x);
System.out.println("x+1=" + ( x + 1 ));运行结果是
x=10
x+1=11x=10x+1=11什么都不打印