2016年9月27日 星期二 --出埃及记 Exodus 18:8Moses told his father-in-law about everything the LORD had done to Pharaoh and the Egyptians for Israel's sake and ab ...
分类:
其他好文 时间:
2016-09-27 17:35:58
阅读次数:
112
2016年9月24日 星期六 --出埃及记 Exodus 18:5Jethro, Moses' father-in-law, together with Moses' sons and wife, came to him in the desert, where he was camped near ...
分类:
其他好文 时间:
2016-09-24 10:26:47
阅读次数:
177
写一个father类,里面有两个属性和一个work方法,输出一句话。一个father的子类son重写work方法,并且还自己有一个sing方法用向上转型和向下转型测试 ...
分类:
编程语言 时间:
2016-09-21 19:57:30
阅读次数:
139
1、复写(override) 1)存在与父类和子类之中; 2)父类和子类中各有一个函数,这两个函数名字,返回值类型,参数列表,完全一样,这就称之为这两个函数之间的关系为复写(override);如: 这就说,son中和father中的function函数存在复写关系。 2、用super调用父类中的成 ...
分类:
移动开发 时间:
2016-09-19 22:23:31
阅读次数:
157
class Father { public event HCDLL.DGTransString OnEvent; protected void SendEvent(string msg) { if (OnEvent != null) { OnEvent(msg); } } } class Son : ...
分类:
其他好文 时间:
2016-09-18 20:50:33
阅读次数:
117
想在子类的字段、属性里调用父类的非静态字段、属性是不可行的,因为字段、属性的初始化是在类的构造函数之前。 比如子类调用父类的字段,需要初始化父类,但是父类没有初始化的时候你调用父类的字段、属性就会出错。 class Son: Father { public string sonKey = "son" ...
分类:
其他好文 时间:
2016-08-30 01:51:18
阅读次数:
188
public class Test001 { public static void main(String[] args) { new Child(); } }class Father{ private String name = "f"; public Father(){ tell(); } pu ...
分类:
其他好文 时间:
2016-08-27 20:42:34
阅读次数:
427
男神的树 题目链接:http://acm.xidian.edu.cn/problem.php?id=1164 DFS 早上才写了一题...回来发现除了这题外其他都好简单= = 这题用vector存孩子会爆空间,所以想到用father[N]存父节点,lazy[N]数组存修改值(和线段树的lazy用法一 ...
分类:
其他好文 时间:
2016-08-23 16:20:23
阅读次数:
161
输出结果: 分析:方法是static类型,说明方法是属于类的,也就是父类的,于是父类的对象,调用的就是父类的静态方法。 静态方法不可以被子类重写。 如果将static去掉,那就是多态的使用,输出结果是Father Chiid ...
分类:
其他好文 时间:
2016-08-19 14:53:40
阅读次数:
97
// 覆盖class P{}class Q extends P{} class a{ static void m1(float x){ //静态方法不能被覆盖 System.out.println("father"+x); } void m2(float x){ //基类被子类覆盖 System.o ...
分类:
编程语言 时间:
2016-08-10 19:20:40
阅读次数:
268