自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Just Do It!

努力到无能为力,拼搏到感动自己

  • 博客(7)
  • 资源 (2)
  • 收藏
  • 关注

原创 Java多线程那些事之ConcurrentHashMap

1. HashTable,SynchronizedHashmap,ConcurrentHashmap JDK 1.5之前在多线程环境下,map的实现只有hashtable和synchronized  hashmap,因为hashmap本身不是线程安全的。 ConcurrentHashmap不仅仅是线程安全的,而且在性能上优于hashtable和synchronized hashmap

2016-04-18 15:09:41 548

原创 一个例子看明白hashmap

1.  存储对象 以及测试code package com.java.hashmap; public class Country { String name; long population; public Country(String name, long population) { super(); this.name = name; this.population

2016-04-15 15:58:25 4875

转载 HashMap实现原理分析

http://blog.csdn.net/vking_wang/article/details/14166593 1. HashMap的数据结构 数据结构中有数组和链表来实现对数据的存储,但这两者基本上是两个极端。       数组 数组存储区间是连续的,占用内存严重,故空间复杂的很大。但数组的二分查找时间复杂度小,为O(1);数组的特点是:寻址容易,插入和删除

2016-04-15 14:41:25 376

转载 为什么覆写equals的时候一定要覆写hashCode?

http://blog.csdn.net/michaellufhl/article/details/5833188

2016-04-12 15:47:00 490

原创 java多线程那些事之并发集合

When you need to work with data collections in a concurrent program, you must be very careful with the implementation you choose. Most collection classes are not ready to work with concurrent applicat

2016-04-12 14:49:47 496

原创 java多线程那些事之二Cyclincbarrier和countdownlatch

1. CyclicBarrier public class JavaCyclicBarrierExample { public static void main(String[] args) { //3 threads are part of the barrier, ServiceOne, ServiceTwo and this main thread calling th

2016-04-11 15:28:05 605

原创 java多线程那些事之一

1.  Callable 接口        获取线程执行状态(get、get(long timeout)),取消线程(cancel(boolean  mayinterruptifrunning)),isCancel,isDone等。 1.  实现callable 接口, 2.  创建线程池,submit thread 如下所示: Future processF

2016-04-07 15:58:47 2939

Spring AMQP 集成完整代码,可运行

Spring AMQP实例 以及Spring 配置文件动态注入属性使用实战

2015-02-04

java排序算法

排序算法的java和c实现,有思路有代码,值得学习!!!

2012-04-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除