• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Lovemeifyoudare

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 下一页

2019年2月15日

宠物商店
摘要: interface Pet { // 定义一个宠物的标准 public String getName(); public int getAge(); public String getColor();} //链表 public class Link {// 外部类,外部可见,只有这一个类 // 定义 阅读全文
posted @ 2019-02-15 21:08 Lovemeifyoudare 阅读(296) 评论(0) 推荐(0)
 
抽象类和接口之间的区别
摘要: 抽象类和接口之间的区别1.关键字 abstract class interface2.组成 构造方法,抽象方法,普通方法,static方法,常量和变量 接口只有全局常量和抽象方法3.子类的使用 class子类extends抽象类 class类实现多个interface4.关系 抽象类可以实现多个接口 阅读全文
posted @ 2019-02-15 09:46 Lovemeifyoudare 阅读(160) 评论(0) 推荐(0)
 

2019年2月14日

代理设计模式
摘要: package designmode; interface Subject { // 整个操作的核心主题 public void make();// 整个操作的核心功能} class RealSubject implements Subject { public void make() { Syst 阅读全文
posted @ 2019-02-14 23:09 Lovemeifyoudare 阅读(118) 评论(0) 推荐(0)
 
继承实战
摘要: package test; class sortArray extends Array { public sortArray(int num) { super(num); } public int[] getData() { java.util.Arrays.sort(super.getData() 阅读全文
posted @ 2019-02-14 21:43 Lovemeifyoudare 阅读(140) 评论(0) 推荐(0)
 
工厂设计模式
摘要: package designmode; interface Fruit { public void eat();} class Apple implements Fruit { public void eat() { System.out.println("这个苹果真好吃!"); }} class 阅读全文
posted @ 2019-02-14 21:37 Lovemeifyoudare 阅读(114) 评论(0) 推荐(0)
 

2019年1月22日

接口匿名内部类
摘要: package object01; interface Eatable { void taste();} interface Flyable { void fly(String weather);} interface Addable { double add(int a, double b);} 阅读全文
posted @ 2019-01-22 20:00 Lovemeifyoudare 阅读(156) 评论(0) 推荐(0)
 
枚举类
摘要: package object01; public enum Season { //定义枚举类 spring, summer, autumn, winter;} //测试 public class EnumTest { public void judge(Season a) { switch (a) 阅读全文
posted @ 2019-01-22 19:53 Lovemeifyoudare 阅读(91) 评论(0) 推荐(0)
 
接口.匿名内部类
摘要: package object01; public interface Command {//定义一个接口 让其他类去实现 void pArray(int[] arr); //打印数组 int addArray(int[] arr); //数组求和} public class InplementArr 阅读全文
posted @ 2019-01-22 19:44 Lovemeifyoudare 阅读(211) 评论(0) 推荐(0)
 
学生信息管理系统(bug)
摘要: 建立一个包含学生、家长、老师、班级的学校管理模型,系统录入、查询学生信息、家长信息、老师,以及班级的信息,注意,要建立各信息间的关联 //学生类 package demo; public class Student { private String name; private int Cid; pr 阅读全文
posted @ 2019-01-22 18:31 Lovemeifyoudare 阅读(234) 评论(0) 推荐(0)
 
System类
摘要: package baseClass7; import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.util.Map;import java.u 阅读全文
posted @ 2019-01-22 18:22 Lovemeifyoudare 阅读(103) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 下一页