02 2022 档案

摘要: 阅读全文
posted @ 2022-02-28 19:12 SmallPepsi 阅读(5) 评论(0) 推荐(0) 编辑
摘要:public static void main(String[] args) { //静态初始化 创建+赋值 int [] a= {1,2,3,4,5,6,7}; System.out.println(a[2]); //引用类型 引用其他类的 Man[] mans = {new Man(),new 阅读全文
posted @ 2022-02-28 19:06 SmallPepsi 阅读(26) 评论(0) 推荐(0) 编辑
摘要:for (int j = 0; j < newSize; j++) { //执行todo } 1.首先变量j初始化为0 2.然后j=0的值跟newSize进行比较,假如为true,则执行{}里面的内容,假如为false,则跳出循环体 3.{}执行完成,再执行j++ 4.j++执行完成,再跟newSi 阅读全文
posted @ 2022-02-28 17:48 SmallPepsi 阅读(1185) 评论(0) 推荐(0) 编辑
摘要:animation-duration: 2s; 动画的执行时间 animation-delay:0.2s; 动画的延时 animation-timing-function:linear; 动画的时序 linear 动画从头到尾的速度是相同的。 测试 ease 默认。动画以低速开始,然后加快,在结束前 阅读全文
posted @ 2022-02-20 16:44 SmallPepsi 阅读(72) 评论(0) 推荐(0) 编辑
摘要:++ -- 自增 自减 一元运算符int a=3;int b=a++;//a++ a = a + 1 执行完这行代码后,先给b赋值,再进行自增int c=++a;//先自增,再进行c赋值System.out.println(a);System.out.println(b);System.out.pr 阅读全文
posted @ 2022-02-19 23:04 SmallPepsi 阅读(33) 评论(0) 推荐(0) 编辑
摘要:int a = 10;int b = 20;int c = 33;System.out.println(a>b);System.out.println(a<b);System.out.println(a==b);System.out.println(a>=b);System.out.println( 阅读全文
posted @ 2022-02-19 23:01 SmallPepsi 阅读(9) 评论(0) 推荐(0) 编辑
摘要:顺序从低到高 byte,short,char -> int -> long -> float -> doubledouble e = 500;long a = 1000L;int b = 100;short c = 10;byte d = 8;System.out.println(a+b+c+d+e 阅读全文
posted @ 2022-02-19 22:39 SmallPepsi 阅读(28) 评论(0) 推荐(0) 编辑
摘要://类变量 staticstatic double salary = 2500;//实例变量:从属于对象(类),如果不自行初始化,这个类型的默认值 0 0.0//布尔值:默认是false//除了基本类型,其余的默认值都是nullString name;int age;//main方法public s 阅读全文
posted @ 2022-02-19 22:17 SmallPepsi 阅读(29) 评论(0) 推荐(0) 编辑
摘要:操作比较大的数的时候,注意溢出问题//JDK7新特性 数字间可以用下滑线分割int money = 10000_0000_0;int years = 20;int total = money*years;long total2 = money*years;//默认是int,转换之前已经存在问题了lo 阅读全文
posted @ 2022-02-19 22:11 SmallPepsi 阅读(16) 评论(0) 推荐(0) 编辑
摘要:// 级别从低到高排序 byte,short,char -> int -> long -> float -> double int i = 128;byte b = (byte)i;//强制转换 (类型)变量名 高--低//自动转换 低--高System.out.println(i);System. 阅读全文
posted @ 2022-02-19 22:08 SmallPepsi 阅读(21) 评论(0) 推荐(0) 编辑
摘要://二进制0b开头 十进制 八进制0开头 十六进制0x开头int i = 10;int i1 = 010;//八进制int i2= 0x10; //十六进制System.out.println(i+"+"+i2+"+"+i1);//浮点数拓展//float 有限 离散 舍入误差 大约 接近但不等于/ 阅读全文
posted @ 2022-02-19 22:07 SmallPepsi 阅读(24) 评论(0) 推荐(0) 编辑
摘要:八大基本数据类型 八大基本数据类型:byte,short,long,int,float,double,char,boolean //整数 int num1 = 10; byte num2 = 20; //byte不能超过127 short num3 = 30; long num4 = 30L;//l 阅读全文
posted @ 2022-02-19 22:04 SmallPepsi 阅读(25) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示