E. Alice, Bob, Oranges and Apples E. Alice, Bob, Oranges and Apples Alice and Bob decided to eat some fruit. In the kitchen they found a large bag of ...
分类:
移动开发 时间:
2016-07-12 22:57:29
阅读次数:
285
class Person{ String name="小花"; int age=19; void eat(){ System.out.println("在吃饭"); }}class Student extends Person{ void study(String name,int age){ Sy ...
分类:
其他好文 时间:
2016-07-10 21:43:16
阅读次数:
174
redis中实现发布与订阅相对于zookeeper非常简单。直接使用publish和subscribe就行。 subscrible news; 订阅news这个channel publish news a-dog-eat-a-pig 在news这个channel就接受到信息 ...
分类:
其他好文 时间:
2016-07-01 18:04:30
阅读次数:
113
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i ...
分类:
编程语言 时间:
2016-06-30 12:25:21
阅读次数:
204
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: 这题其实是算是Valid Anagram的一个fol ...
分类:
其他好文 时间:
2016-06-27 23:01:34
阅读次数:
261
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i ...
分类:
其他好文 时间:
2016-06-22 22:00:17
阅读次数:
139
对事物的抽象描述描述这类事物的特征和行为对象是类的实例代码实现:创建一个类functionpeple(){
this.hp=0;
this.act=30;
this.name="";
this.x=0;
this.y=0;
this.move=function(x,y){
document.write(this.name+"正在移动到"+x+","+y);
}
this.eat=function(){
document.wri..
分类:
编程语言 时间:
2016-06-17 17:29:27
阅读次数:
224
< script type = "text/javascript" >function Person() { // 属性 this.head = 1; this.eye = 2; // 方法 this.eat = function () { alert("吃东西"); } } //扩展类的方法 Pe ...
分类:
编程语言 时间:
2016-06-16 20:09:51
阅读次数:
115
匿名内部类也就是没有名字的内部类 正因为没有名字,所以匿名内部类只能使用一次,它通常用来简化代码编写 但使用匿名内部类还有个前提条件:必须继承一个父类或实现一个接口。 实例1:不使用匿名内部类来实现抽象方法 运行结果:eat something 可以看到,我们用Child继承了Person类,然后实 ...
分类:
其他好文 时间:
2016-06-13 19:14:08
阅读次数:
121
定义一个不包含任何方法的接口,用它仅仅来表示一种抽象类型。所有实现该接口的类意味着属于这种类型。 比如定义一个Food接口,其中不包含任何方法: 鱼肉: 进食方法: 进食: 所谓标识类型模式就是借助Java编译器来对传给eat()方法的food参数进行语义上的约束。Food接口被称为标识类型接口,这 ...
分类:
其他好文 时间:
2016-06-12 18:39:05
阅读次数:
130