1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
package 数据类型和运算符;
public class TestOperator_4 { public static void main(String[] args) { int a = 1; int b = 2; String c = "3"; System.out.println(a+b); System.out.println(a+c); System.out.println(c+a); System.out.println(a+b+c); System.out.println(c+b+a); char d = '4'; System.out.println(d); System.out.println(a+d); System.out.println(c+d); } }
|