java常识和好玩的注释

如字符串使用strXXX
boolean使用isXXX,hasXXX

Vector vProducts= new Vector();
Array aryUsers= new Array(); 

 
类与接口

基本原则:
一个类只做一件事情。另一个原则时根据每个类的职责进行划分,比如用
User来存放用户信息,而用UserDAO来对用户信息进行数据访问操作,用UserServer对用户
信息的业务操作等等。多个类中使用相同方法时将其方法提到一个接口中或使用抽象类,
尽量提高重用度。不希望被实例化的类的缺省构造方法声明为private。

乘法和除法尽量使用移位 << 和 >>

可爱的注释:

Originally I also know what I am writing, but now, only god know.
原先我还知道我在写什么,但是现在,只有上帝知道了
There is something wrong with the code don't find me!Although I wrote, but they themselves grow slanting.
代码有问题别找我!虽然是我写的,但是它们自己长歪了
If you see this,  it means that you are now in charge of my previous projects. I feel very sorry. May god bless you.
如果你看到这个,那么说明你现在已经在负责我以前的项目了。我感到非常抱歉。愿上帝保佑你。
0不能做除数,没办法我只好用一个非常相近的数值代替:0=0.00000000000001
If the code is useful, they are written by Sky, if not, then I do not know who wrote it.
如果这些代码有用,那它们是Sky写的,如果没用,那我就不知道是谁写的了。

 

posted @ 2016-11-23 21:42  Sky.宾桀锋  阅读(1044)  评论(0编辑  收藏  举报