摘要: 1. 关于HashMap的一些说法: a) HashMap实际上是一个“链表散列”的数据结构,即数组和链表的结合体。HashMap的底层结构是一个数组,数组中的每一项是一条链表。 b) HashMap的实例有俩个参数影响其性能: “初始容量” 和 装填因子。 c) HashMap实现不同步,线程不安 阅读全文
posted @ 2017-08-14 19:46 美味的花 阅读(205) 评论(0) 推荐(0) 编辑
摘要: void waitForSignal() { Object obj = new Object(); synchronized(Thread.currentThread()) { obj.wait(); obj.notify(); } } This code may throw an Interrup 阅读全文
posted @ 2017-08-14 19:45 美味的花 阅读(602) 评论(0) 推荐(0) 编辑
摘要: A dst=String.fromBytes(src,"GBK").getBytes("UTF-8") B dst=new String(src,"GBK").getBytes("UTF-8") C dst=new String("GBK",src).getBytes() D dst=String. 阅读全文
posted @ 2017-08-14 19:43 美味的花 阅读(851) 评论(0) 推荐(0) 编辑