子敬正在创造自己的人生
需求有轻重缓急,功能有可控不可控。 需求有版本有截止(否则会无休无止),功能不可控变为可控。 集中兵力消灭敌人有生力量,集中优势兵力消灭敌人有生力量。
摘要: annotation事实上就是一个interface下面举一个例子package annotation.inherit; public @interface DefinedAnnotation { }将其class文件反编译之后 package annotation.inherit; import java.lang.annotation.Annotation; public interface DefinedAnnotation extends Annotation{} 你会发现事实上他就是一个实现了Annotation接口的interface 阅读全文
posted @ 2011-06-19 20:40 silentjesse 阅读(213) 评论(0) 推荐(0) 编辑
摘要: annotation事实上就是一个interface下面举一个例子package annotation.inherit;public @interface DefinedAnnotation {}将其class文件反编译之后// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.// Jad home page: http://kpdus.tripod.com/jad.html// Decompiler options: packimports(3) fieldsfirst ansi space // Source File 阅读全文
posted @ 2011-06-19 20:36 silentjesse 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 何为标记标识(Maker)呢?1、java.io.Serializable 这个接口并没有任何方法,成员,为什么还要实现他呢?----------Maker interface 原因他纯粹是为了标识此实现类可以被系列化..给虚拟机提供一个标识而已 查询jdk的api文档就知道了"The serialization interface has no methods or fields and serves only to identify the semantics of being serializable"2、在java中还有一种标记只是用于标记(Maker),即Make 阅读全文
posted @ 2011-06-19 20:16 silentjesse 阅读(1174) 评论(0) 推荐(0) 编辑
摘要: 目前我所知道的有1、通过Class对象的newInstance()方法,这种方法的局限是只能取调用默认的构造函数2、通过取得Class对象的getConstructor方法取得Construtor对象,然后再通过调用Constructor类的newInstance的两个方法3、通过Array.newInstance方法来创建对象,但这种只适用于数组,数组也是一种对象 阅读全文
posted @ 2011-06-19 16:11 silentjesse 阅读(6734) 评论(0) 推荐(0) 编辑
摘要: 1、.getClass()2、.class3、.TYPE,但这种方法只适用于java的8个基本数据类型对应的包装类型,例如Integer.TYPE,Double.TYPE,Long.TYPE 阅读全文
posted @ 2011-06-19 16:07 silentjesse 阅读(265) 评论(0) 推荐(0) 编辑
摘要: The Array class provides static methods to dynamically create and access Java arrays.Array 类提供静态的方法来动态的创建和访问java数组事实上数组也是一个Object通过 Array的静态方法newInstance()方法得到的就是一个Object对象 阅读全文
posted @ 2011-06-19 15:53 silentjesse 阅读(1118) 评论(0) 推荐(0) 编辑