Java 中的"+"号(加法和连接)
public class Test {
public static void main(String[] args) {
System.out.println(2 + 0 + 1 + 6 + "GeeksforGeeks");
System.out.println("GeeksforGeeks" + 2 + 0 + 1 + 6);
System.out.println(2 + 0 + 1 + 5 + "GeeksforGeeks" + 2 + 0 + 1 + 6);
System.out.println(2 + 0 + 1 + 5 + "GeeksforGeeks" + (2 + 0 + 1 + 6));
}
}
参考答案
```
9GeeksforGeeks
GeeksforGeeks2016
8GeeksforGeeks2016
8GeeksforGeeks9
```