Go hastypes and valuesrather than classes and objects. So can a language without classes or objects be object-oriented? While Go may not fit the typical mold of an OOP language, it does ?provide m...
分类:
其他好文 时间:
2014-11-06 15:14:02
阅读次数:
157
抽象工厂:为一个产品家族提供了统一的创建接口。当需要这个产品家族的某一系列的时候,可以从抽象工厂中选出相对系的系列来创建一个具体的工厂类别。...
分类:
其他好文 时间:
2014-11-06 14:56:05
阅读次数:
141
二者都是用来修饰基类的,通过覆盖基类的定义,让派生类重新定义。相同点:如果用于修饰方法,必须声明为Public(公有的)或者Protected(受保护的),因为派生类是不能访问Private(私有)方法的。不同点:Virtual:虚拟的,1基类中Virtual修饰的方法必须有实现,即便是只有一个大括...
分类:
其他好文 时间:
2014-11-06 10:47:38
阅读次数:
163
mock interfaces, delegates and classes, including those with parameterized constructors.set expectations on the called methods by using strongly typed...
分类:
其他好文 时间:
2014-11-05 19:04:28
阅读次数:
238
本实例主要用鼠标在窗体上绘图用到组件有TBevel、TRadioGroup、TButton组件运行效果如下:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Fo....
用法:在abstract class方式中,类可以有自己的数据成员,也可以有非 abstract的成员方法,而在interface方式的实现中,类只能够有静态的不能被修改的数据成员(也就是必须是static final 的,不过在interface中一般不定义数据成员),所有的成员方法都是abstr...
分类:
编程语言 时间:
2014-11-05 12:48:43
阅读次数:
177
一、最简单的方法是重装sublime,速度也很快。二、 1.打开注册表:win+r 调出“运行”,输入 regedit.exe 2.进入分支:HKEY_CLASSES_ROOT\*\shell\ 新建Open with Sublime Text 2 项,然后咋Open with Sublime .....
分类:
其他好文 时间:
2014-11-05 12:14:47
阅读次数:
155
关于抽象类:abstract class Car{ abstract function getMaximumSpeed();}class FastCar extends Car{ function getMaximumSpeed(){ return 150; }}注意事项:如果实现的类也是抽象的,....
分类:
Web程序 时间:
2014-11-05 10:34:48
阅读次数:
240
NumberFormat 表示数字的格式化类, 即:能够依照本地的风格习惯进行数字的显示。此类的定义例如以下:public abstract class NumberFormat extends FormatMessageFormat 、DateFormat 、NumberFormat 是 Form...
分类:
其他好文 时间:
2014-11-04 19:27:44
阅读次数:
135
多态:父类型的引用可以指向子对象。Parentp=newChild();当使用多态方式调法时,首先检查父类中是否有sing()方法,如果没,则编译错误;如果有,再去调用子类的sing()方法。两种强制类型转换向上类型转换(向上类型转换(upcast):比如说将比如说将Cat类型转换为Animal类型,..
分类:
编程语言 时间:
2014-11-04 06:58:17
阅读次数:
199