2017年6月16日
摘要: 1.Dao层步骤 第一步:建表 第二步:实体类 第三步:写接口(需求) 第四步:帮助类(BaseDao)(只需写一次) 第五步:实现类 表 >实体类 >dao >biz >controller serializable 序列化接口 序列化 接口+实现 接口+实现 2.MVC思想 1.model:模型 阅读全文
posted @ 2017-06-16 00:00 星星&之火 阅读(110) 评论(0) 推荐(0) 编辑
  2017年6月15日
摘要: 1.导入第三方jar包 第一步:右击工程名,新建文件夹(Fold),名字为lib 第二步:把第三方jar包复制到lib目录下 第三步:右击工程名 >properties >java build path >libraries >add jar >再从项目中的lie目录下选中你要的jar包 >确定 2 阅读全文
posted @ 2017-06-15 23:59 星星&之火 阅读(111) 评论(0) 推荐(0) 编辑
摘要: public class Test { private static Logger logger=Logger.getLogger(Test3.class.getName()); public static void main(String [] args){ Scanner input=new S 阅读全文
posted @ 2017-06-15 23:59 星星&之火 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.接口 1.1语法 public interfaca 接口名 extendx 接口1,接口2..{ //1.常量 //2.抽象方法 } 1.2特点 a.用interface修饰 b.接口可以用继承接口,多继承 c.接口内只能定义常量和抽象方法 d.接口不能实例化,但是可以作为子类的引用 e.实现接 阅读全文
posted @ 2017-06-15 23:57 星星&之火 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 1.instanceof 语法:对象A instanceof 类型B 判断对象A的类型是否是类型B,如果是就返回true,否则就返回false 例:d instanceof Dogpublic interface DoorBell { void takePictures(); //拍照存档功能}public interface Loc... 阅读全文
posted @ 2017-06-15 23:56 星星&之火 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1.4实现多态的两种形式: a.使用父类作为方法形参实现多态 public void play(F p){...}; b.使用父类作为方法返回值实现多态 public F getF(int type){...}; //子类,圆形 public class Circular extends Graph 阅读全文
posted @ 2017-06-15 08:52 星星&之火 阅读(144) 评论(0) 推荐(0) 编辑
摘要: public class A { { System.out.println("父类代码块"); } public A(){ System.out.println("父类构造函数"); } private int site =4; } public class B extends A{ { Syste 阅读全文
posted @ 2017-06-15 08:51 星星&之火 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1.抽象类(abstract) 1.1抽象类 语法: public abstract class 类名(); 1.2抽象方法 语法:public abstract 返回值类型 发放名(参数列表); 例: public abstract void print(); 注意:抽象发放有abstract修饰 阅读全文
posted @ 2017-06-15 08:50 星星&之火 阅读(124) 评论(0) 推荐(0) 编辑
摘要: public class Pet { private int age; //昵称 private String name; //健康 private int health; //亲密 private int love; public Pet(){ } public Pet(String name){ 阅读全文
posted @ 2017-06-15 08:49 星星&之火 阅读(190) 评论(0) 推荐(0) 编辑
摘要: public class Excelle { private String type; private String id; public Excelle(){ } public Excelle(String id,String type){ this.type=type; this.id=id; 阅读全文
posted @ 2017-06-15 08:47 星星&之火 阅读(167) 评论(0) 推荐(0) 编辑