• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
开水房
ASP.NET
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页
2010年8月16日
java 多线程 读写锁
摘要: 利用读写锁(ReentrantReadWriteLock) 可实现对临界资源多线程时读写控制class M{ private static Map<Integer,String> map = new HashMap<Integer,String>(); private static M m = new M(map); public static M getInstance... 阅读全文
posted @ 2010-08-16 11:26 白开水皮皮 阅读(532) 评论(0) 推荐(0)
java 多线程 资源共享
摘要: 在控制资源共享的语句外,加入 synchronized(this) (this也可用private Object o 对象),来进行写锁保护class M{ private static M m = new M(); public static M getInstance() { return m; } public void check(int i) { System.out.printl... 阅读全文
posted @ 2010-08-16 09:44 白开水皮皮 阅读(368) 评论(0) 推荐(0)
2010年8月12日
java多线程的两种实现方式
摘要: 1. 继承Thread类,实现run方法2. 实现 Runnable接口,将该类绑定到新建的Thread对象上  class example Runnable  {    public void run()    {}  }  Invoke:  public static void main(String[] args)  {    Thread th = new Thread(new examp... 阅读全文
posted @ 2010-08-12 10:56 白开水皮皮 阅读(206) 评论(0) 推荐(0)
2010年8月6日
面向接口编程
摘要: 将设计和编程分开,在设计时,仅考虑作用和功能是什么,而不去考虑具体的实现方式和数据结构。 阅读全文
posted @ 2010-08-06 11:27 白开水皮皮 阅读(117) 评论(0) 推荐(0)
2010年7月29日
UML:继承、实现、依赖、关联、聚合、组合
摘要: 今天看到一篇好文,觉得还不错,褪去的记忆被唤醒:http://www.alisdn.com/wordpress/?p=1135继承指的是一个类(称为子类、子接口)继承另外的一个类(称为父类、父接口)的功能,并可以增加它自己的新功能的能力,继承是类与类或者接口与接口之间 最常见的关系;在Java中此类关系通过关键字extends明确标识,在设计时一般没有争议性;实现指的是一个class类实现inte... 阅读全文
posted @ 2010-07-29 09:57 白开水皮皮 阅读(286) 评论(0) 推荐(0)
java.text.MessageFormat
摘要: With MessageFormat, we can output String with parameters:MessageFormat:private static final String FAILURE = "#ERROR: FAILED TO LOCALIZE {0}";String value = MessageFormat.format(FAILURE, new Object[] ... 阅读全文
posted @ 2010-07-29 09:37 白开水皮皮 阅读(202) 评论(0) 推荐(0)
2010年7月19日
javascript 语言精粹 学习笔记
摘要: chapter 3: 对象null and undefinenull 是对象使用;undefined是属性使用var obj = {"first":"Kevin","last":"Ge"}判断是否是null     if(obj["middle"] == null)判断是否是undefine  if(typeof obj["middle"] == "undefine")        或   if... 阅读全文
posted @ 2010-07-19 10:37 白开水皮皮 阅读(263) 评论(0) 推荐(0)
2010年7月14日
js parseURL
摘要: <script>function parseURL(url) { var a = document.createElement('a'); a.href = url; return { source: url, protocol: a.protocol.replace(':',''), host: a.hostname, port: a.port, query: a.search, p... 阅读全文
posted @ 2010-07-14 10:46 白开水皮皮 阅读(1187) 评论(0) 推荐(0)
2010年7月8日
javascript 判断变量是否存在
摘要: Thetypeofoperator returns the following results for these variables: 阅读全文
posted @ 2010-07-08 15:28 白开水皮皮 阅读(227) 评论(0) 推荐(0)
2010年7月6日
javascript with
摘要: 这个是开域语句, 表示在with语句中的任何表达式的所属对象或者是类都由with后紧跟的变量所代表 阅读全文
posted @ 2010-07-06 15:31 白开水皮皮 阅读(165) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3