[b]1.Create & Destroy an object[/b]
a.public static Type valueOf(String name);
b.factory method: Type createByName(String name);
These methods can return subclass type
[可返回子类型,而 Constructor 则不行]
Do never use 'new' to create object
[b]2.Avoid of re-create object[/b]
[b]3.Eliminate of outdated references[/b]
[b]4.Carefully use exceptions[/b]
Exceptions will effect performances of your application
[b]5.Do never re-initialize variable[/b]
-------- period 09/02,2010 1:30 pm
[b]6.Make the modifier of class 'final' as far as possible[/b]
So does the method!
[b]7.Make full use of local variables {which stored stack}[/b]
a.public static Type valueOf(String name);
b.factory method: Type createByName(String name);
These methods can return subclass type
[可返回子类型,而 Constructor 则不行]
Do never use 'new' to create object
[b]2.Avoid of re-create object[/b]
[b]3.Eliminate of outdated references[/b]
if(size==0)
this.array[size]==null
[b]4.Carefully use exceptions[/b]
Exceptions will effect performances of your application
[b]5.Do never re-initialize variable[/b]
-------- period 09/02,2010 1:30 pm
[b]6.Make the modifier of class 'final' as far as possible[/b]
So does the method!
[b]7.Make full use of local variables {which stored stack}[/b]