09 2017 档案

摘要:class Demo extends Thread{//创建线程的第一种方法,继承Thread public void run(){ for (int i = 0; i < 1000; i++) { System.out.println("demo run _____"+i); } } }class 阅读全文
posted @ 2017-09-27 14:35 陈焕炽 阅读(234) 评论(0) 推荐(0)
摘要:import java.util.Arrays; public class MyList<T>{ public int size;//因为数组长度是可变的,所以定义一个变量 public Object[] data;//定义一个数组 //new的时候创建数组,所以在构造函数里面new数组 publi 阅读全文
posted @ 2017-09-21 15:11 陈焕炽 阅读(122) 评论(0) 推荐(0)
摘要:package day16; class A{ int f(int x,int y){ return x+y; }} class B extends A{//B继承A并重写A 中的方法 double f(double x,double y){ return x*y; }}public class A 阅读全文
posted @ 2017-09-18 20:51 陈焕炽 阅读(187) 评论(0) 推荐(0)
摘要:1,定义一个接口 public interface Computer { /** * 接口一定是抽象的 * 方法一定也是抽象的 * 属性都是常量 * * */ } 2,再定义一个手机的接口 public interface Phone { /*接口 * 所有手机都要遵守的行业标准 * 抽象方法是不用 阅读全文
posted @ 2017-09-09 16:52 陈焕炽 阅读(194) 评论(0) 推荐(0)