摘要:
位运算符 ~ -- 取反 & -- 按位与 | -- 按位或 ^ -- 按位异或 <<:左移运算符, >>:右移运算符 >>>:无符号移位运算符 左移一位相当于乘2。右移一位相当于除2取商。 public class TestOperator{ public static void main(Str 阅读全文
posted @ 2021-02-07 14:21
二两也逍遥
阅读(57)
评论(0)
推荐(0)
摘要:
public class TestOperator{ public static void main(String[] args) { int a = 3; int b = a++; //执行完后,b=3。先给b赋值,再自增。 int c = ++a; //执行完后,c=5。先自增,再给b赋值 Sy 阅读全文
posted @ 2021-02-07 14:09
二两也逍遥
阅读(141)
评论(0)
推荐(0)
摘要:
1. 所有变量、方法、类名:见名知意 2. 类成员变量:首字母小写和驼峰原则 : monthSalary 3. 局部变量:首字母小写和驼峰原则 4. 常量:大写字母和下划线:MAX_VALUE 5. 类名:首字母大写和驼峰原则: Man, GoodMan 6. 方法名:首字母小写和驼峰原则: run 阅读全文
posted @ 2021-02-07 14:03
二两也逍遥
阅读(189)
评论(0)
推荐(0)
摘要:
public class TestCharType{ public static void main(String[] args) { char c1 = 'a'; char c2 = '爪';//unicode 2:0-65535 char c3 = '\'';//转义 System.out.pr 阅读全文
posted @ 2021-02-07 13:42
二两也逍遥
阅读(40)
评论(0)
推荐(0)
摘要:
Java数据类型 数据类型 1、基本数据类型 数值型 整数型(byte、short、int、long) 浮点型(float、double) 字符型(char) 布尔型(boolean) 2、引用数据类型 类(class) 接口(interface) 数组 public class TestDataT 阅读全文
posted @ 2021-02-07 11:12
二两也逍遥
阅读(55)
评论(0)
推荐(0)