摘要: 使用next方法 1 public class ScannerNextTest { 2 public static void main(String[] args) { 3 // 从键盘获取输入的内容 4 Scanner scanner = new Scanner(System.in); 5 Sys 阅读全文
posted @ 2021-07-12 18:04 ~Forever 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1 int a = 10; 2 int b = 20; 3 4 a+= b; // 左侧计算式等价于:a = a + b; 5 a-=b; // 左侧计算式等价于: a = a - b; 6 7 System.out.println(a); // 30 8 9 // 字符串连接符 + 10 // + 阅读全文
posted @ 2021-07-12 18:00 ~Forever 阅读(31) 评论(0) 推荐(0) 编辑