2.11
2017
Day2 笔记 赋值运算符的基本用法
class Demo1_Operator { public static void main(String[] args) { //赋值运算符 int a = 3; //把右边的常量值赋值给左边的变量.左边必须是变量 a += 4; //a = a + 4; a -= 2; //a = a - 2; a *= 10; //a = a * 10; a /= 10; //a = a ÷ 10 System.out.println("a = " + a); } } |
上一篇
下一篇