2014年7月27日
摘要: 装饰模式(Decorator)最常见的就是JDK中的关于文件流的处理。 DataInputStream dis = = new DataInputStream(new BufferedInputStream(new FileInputStream("test.txt"))); 装饰... 阅读全文
posted @ 2014-07-27 22:48 lnlvinso 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Python中的字典类似于Java中的Map,数据以键值对的形式存储。 字典可以用以下的方式使用: >>> phonebook = {"alice":"6100","bruce":"6230","beth":"9120"} >>> phonebook.get("alice") '6... 阅读全文
posted @ 2014-07-27 14:19 lnlvinso 阅读(166) 评论(0) 推荐(0) 编辑