君半杯

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2021年6月28日

摘要: //字符串连接符 + , String int a = 10;int b = 20; System.out.println(""+a+b);//输出为1020System.out.println(a+b+"");//输出为30,如果字符串(“”)在后面,那么他依旧进行运算 //条件运算符 // x 阅读全文
posted @ 2021-06-28 14:11 君半杯 阅读(23) 评论(0) 推荐(0)

摘要: //++ -- 自增, 自减 一元运算符int a = 3;int b = a++; //执行完这行代码后,先给b赋值,再自增//a = a + 1;System.out.println(a); //a = 4System.out.println(b); //b = 3System.out.prin 阅读全文
posted @ 2021-06-28 13:29 君半杯 阅读(248) 评论(0) 推荐(0)