java代码
zhtttyyzc
这个作者很懒,什么都没留下…
展开
-
设计模式之单列
private static HttpTask sHttpTask;public static HttpTask getInstance () {if (sHttpTask == null) {synchronized (HttpTask.class) {if (sHttpTask == null) {sHttpTask = new HttpTask();}}原创 2015-12-28 15:28:45 · 593 阅读 · 0 评论 -
java枚举
留作备用public enum ReqMethod {REGISTER("user_post"),GETCITY("openCityList");String method;ReqMethod (String method) {this.method = method;}public String getRequestMethod () {r原创 2015-12-28 15:30:42 · 420 阅读 · 0 评论