1.Object类
在java的开发中,一切类都是以继承的方式存在的,如果一个类在定义时没有明确指明继承的是哪个类,那么默认情况继承Object类。
例如
class Person
{
}
以上代码默认定义Object,其完整表达形式为:
class Person extends Object
{
}
在jdk文档中,API-> index->java.lang->Object寻...
分类:
编程语言 时间:
2014-12-20 18:22:04
阅读次数:
235
var memInfo = enumType.GetType().GetMember(enumType.ToString()); var attributes = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false)....
分类:
其他好文 时间:
2014-12-19 11:24:55
阅读次数:
140
public DataTable ConvertToDataTable(IList data) { PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(typeof(T)...
分类:
其他好文 时间:
2014-12-18 14:53:02
阅读次数:
179
面试里面泛型被问的很多,但是回答的时候,除了说在集合类里面使用泛型以外,好像也不知道该说点啥了
看完 effective java,觉得还是有点东西说的,
1 先看一个编译错误
Cannot perform instanceof check against parameterized type Set. Use the form Set instead since further g...
分类:
编程语言 时间:
2014-12-18 12:01:00
阅读次数:
156
typeof: The typeof operator is used to obtain the System.Type object for atype.运算符,获得某一类型的System.Type对象。Type t = typeof(int);GetType: Gets the Type of...
分类:
其他好文 时间:
2014-12-17 18:10:53
阅读次数:
111
Decltype was among the first C++11 features implemented in GCC. It has roots in a very old GNU extension named__typeof__, also usable in C and well known to users of the GNU Compiler Collection. The C...
分类:
编程语言 时间:
2014-12-16 19:17:12
阅读次数:
353
var bbb1 = typeof str== 'undefined'; //truevar bbb2 = typeof str== undefined; //falsevar bbb3 = str== undefined; //truevar bbb4 = str== 'undefined'; /...
分类:
Web程序 时间:
2014-12-16 18:33:21
阅读次数:
159
/** * 模拟ajax的 script请求 * @param {[type]} options [description] * @return {[type]} [description] */ function createAjax(options) { if (typeof url === "...
分类:
Web程序 时间:
2014-12-16 16:50:29
阅读次数:
187
如图可以看到;json是个二维数组。我们现在想办法把它递归到最里面一层的数组(也就是说,递归到不是数组的情况,方便操作取值)。instanceof Array 方法是判断是否是数组,当递归data到不是数组的时候,也就是else 里面的情况。console 输出结果如下:得到的是对象,二不是数组。这...
分类:
编程语言 时间:
2014-12-16 13:27:59
阅读次数:
194
SerializeJsonToStr:function(oJson){if(oJson==null)return"null";if(typeof(oJson)==typeof(0))returnoJson.toString();if(typeof(oJson)==typeof('')||oJsoni...
分类:
Web程序 时间:
2014-12-16 11:41:09
阅读次数:
165