如何写好代码
摘要:
最近在审核代码,发现有很多问题,把这些问题一一列举出来,算是自己的一个警示。算是一个系列把。1. 不要直接调用某个class中的变量,需要提供一个方法给客户端调用。比如在某个class里面有errormap,定义如下:A:static { map.put("0", R.string.code0); map.put("2001", R.string.code2001); map.put("2002", R.string.code2002); map.put("2003", R.string.code2003); ma 阅读全文
posted @ 2011-07-13 17:53 布兜兜 阅读(516) 评论(0) 推荐(0) 编辑