以下内容来自周志明的《深入理解Java虚拟机》。 前一篇说了静态分派和重载有关,现在的动态分派就和覆盖Override有关了。 先看代码: 结果输出: 这里不再根据静态类型来决定,因为静态类型同样都是Human的两个变量man和woman在调用sayHello()方法时执行了不同的行为,因为这两个变 ...
分类:
编程语言 时间:
2016-04-24 09:46:58
阅读次数:
180
方法如下: 1、命令模式下输入“/字符串”,例如“/woman”。 2、如果查找下一个,按“n”即可。vi查找替换大全vi/vim中可以使用:s命令来替换字符串。以前只会使用一种格式来全文替换,今天发现该命令有很多种写法(vi真是强大啊,还有很多需要学习),记录几种在此,方便以后..
分类:
系统相关 时间:
2016-04-22 16:45:47
阅读次数:
195
题目: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each ...
分类:
其他好文 时间:
2016-04-21 20:16:21
阅读次数:
149
[中文文字来源:http://weibo.com/p/1001603931593801661149;英文原文作者为Angel Borja博士,文字来源:https://www.elsevier.com/connect/writing-a-science-paper-some-dos-and-dont ...
分类:
其他好文 时间:
2016-04-20 23:14:22
阅读次数:
215
一般的通过属性名查找属性值在百度上很多。例如http://www.jb51.net/article/50812.htm 以下记录以下不知道属性名时候直接查找属性名和属性值的方法: 以下代码是从http://www.thinksaas.cn/ask/question/23572/一个回答中看到的,自己 ...
分类:
编程语言 时间:
2016-04-19 18:59:04
阅读次数:
207
http://ask.dcloud.net.cn/article/152 iOS证书(.p12)和描述文件(.mobileprovision)申请 5+App开发 Apple证书 iOS证书 http://ask.dcloud.net.cn/article/152 iOS证书(.p12)和描述文件( ...
分类:
移动开发 时间:
2016-04-18 15:05:33
阅读次数:
277
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time ...
分类:
其他好文 时间:
2016-04-18 13:33:11
阅读次数:
189
转自: http://hi.baidu.com/onejw/item/f34390c997cdc226a1b50ae http://www.cocoachina.com/ask/questions/show/57217 http://www.cnblogs.com/uyoug321/archive/ ...
分类:
编程语言 时间:
2016-04-18 00:49:48
阅读次数:
255
/// 父类 Person class Person {
var name: String
init(name: String){
self.name = name
}
}/// 子类 Woman class Woman: Person {
var female: String...
分类:
编程语言 时间:
2016-04-17 06:51:52
阅读次数:
215
题目:Reverse digits of an integer.Example1: x = 123, return 321
Example2: x = -123, return -321click to show spoilers.Have you thought about this?
Here are some good questions to ask before coding. Bonus...
分类:
其他好文 时间:
2016-04-16 19:23:18
阅读次数:
140