上一页 1 2 3 4 5 6 7 8 9 10 ··· 25 下一页
摘要: package com.cyjt97.code; public class day { public static void main(String[] args) { } } class code { static int i; static { i = 0; } } 阅读全文
posted @ 2023-03-13 17:30 文采呱呱 阅读(10) 评论(0) 推荐(0) 编辑
摘要: jdk8 -default:为了解决接口升级问题 package com.cyjt97.Paymentsystem;public interface pay { void money(double money); // jdk8新特性 default public default void meth 阅读全文
posted @ 2023-03-13 09:40 文采呱呱 阅读(20) 评论(0) 推荐(0) 编辑
摘要: package com.cyjt97.minterface; public class minterface { // 接口: // 接口的思想提现就是规则 // 如果一个类,所有的组成都是抽象方法, // -没有成员变量 // -没有普通方法 // 这种类我们会设计为java中的接口,因为这个类的 阅读全文
posted @ 2023-03-10 15:18 文采呱呱 阅读(19) 评论(0) 推荐(0) 编辑
摘要: package com.cyjt97.Abstract; public class Abstract { public static void main(String[] args) { } } abstract class a{ public abstract void eat(); } clas 阅读全文
posted @ 2023-03-10 11:33 文采呱呱 阅读(6) 评论(0) 推荐(0) 编辑
摘要: package com.cyjt97.a; public class studer { public static void main(String[] args) { cf(); } private static void cf() { System.out.println("吃饭"); } } 阅读全文
posted @ 2023-03-10 11:20 文采呱呱 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 开闭原则:对功能扩展做开放,对修改代码做关闭 package com; public class finaL { // final:修饰符,可用于修饰方法,类,变量 // 特点: // 修饰方法:表明该方法是最终方法,不能被重写 // 修饰类:表明该类是最终类,不能被继承 // 修饰变量:表明该变量 阅读全文
posted @ 2023-03-10 11:00 文采呱呱 阅读(8) 评论(0) 推荐(0) 编辑
摘要: package com.inherit; public class day { // 提高代码的复用性 public static void main(String[] args) { zzz z = new zzz(); z.setName("张三"); z.setAge(23); System. 阅读全文
posted @ 2023-03-09 17:59 文采呱呱 阅读(14) 评论(0) 推荐(0) 编辑
摘要: package StaticM; public class static01 { String name; int age; static String school;// public static01() { } public static01(String name, int age, Str 阅读全文
posted @ 2023-03-09 11:37 文采呱呱 阅读(20) 评论(0) 推荐(0) 编辑
摘要: package com.demo.studer; public class stu { private String id; private String name; private int age; private String birthday; public stu() { } public 阅读全文
posted @ 2023-03-08 16:17 文采呱呱 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 创建: package com.demo.Array; import java.util.ArrayList; public class day01 { /* Arraylist集合的使用 细节:创建 String, Stringbuilder, Arraylist类的对象,打印对象名,都没有看到地 阅读全文
posted @ 2023-03-07 17:29 文采呱呱 阅读(37) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 25 下一页