摘要: 阅读全文
posted @ 2022-03-06 17:22 SmallPepsi 阅读(27) 评论(0) 推荐(0)
摘要: super注意点: 1.super调用父类的构造方法,必须在构造方法的第一个 2.super必须只能出现在子类的方法或者构造方法中 3.super和this不能同时调用构造方法Vs this: 代表的对象不同: this:本身调用者这个对象 super:代表父类对象的引用 前提 this:没有继承也 阅读全文
posted @ 2022-03-06 17:10 SmallPepsi 阅读(29) 评论(0) 推荐(0)
摘要: 比如在子类中定义这样一个方法 public void test1(){ print();//student this.print();//student super.print();//person} public void print() { System.out.println("STUDENT 阅读全文
posted @ 2022-03-06 17:08 SmallPepsi 阅读(25) 评论(0) 推荐(0)
摘要: 静态方法和非静态方法:测试类中的代码A a = new A();a.test();B b = new B();b.test();A类中的代码(静态方法)A类继承B类 public static void test() { System.out.println("A-TEST");} B类中的代码(静 阅读全文
posted @ 2022-03-06 17:08 SmallPepsi 阅读(25) 评论(0) 推荐(0)
摘要: 内存分析 阅读全文
posted @ 2022-03-03 16:42 SmallPepsi 阅读(35) 评论(0) 推荐(0)
摘要: 构造器:1.和类名相同2.没有返回值作用:1.new 本质在调用构造方法2.初始化对象的值注意点:1.定义了有参构造之后,如果想使用无参构造,显示的定义一个无参的构造 阅读全文
posted @ 2022-03-03 16:18 SmallPepsi 阅读(34) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-02-28 19:12 SmallPepsi 阅读(11) 评论(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 阅读(32) 评论(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 阅读(1216) 评论(0) 推荐(0)
摘要: animation-duration: 2s; 动画的执行时间 animation-delay:0.2s; 动画的延时 animation-timing-function:linear; 动画的时序 linear 动画从头到尾的速度是相同的。 测试 ease 默认。动画以低速开始,然后加快,在结束前 阅读全文
posted @ 2022-02-20 16:44 SmallPepsi 阅读(79) 评论(0) 推荐(0)