- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 ArrayList源码解读(jdk1.7)
arraylist底层是有Object类型的数组构成的。源代码如下 /** * The array buffer into which the elements of the ArrayList are stored. * The capacity of the ArrayList is the length of this array buffer. Any
2018-05-23 15:09:37 243
原创 关于jdk中的AtomicInteger的操作
private static final Unsafe unsafe = Unsafe.getUnsafe(); private static final long valueOffset; static { try { valueOffset = unsafe.objectFieldOffset (Atomic
2018-05-23 15:09:21 339
原创 关于jdk1.7中的ThreadLocal
1.get()方法 /** * Returns the value in the current thread's copy of this * thread-local variable. If the variable has no value for the * current thread, it is first initialized to the value
2018-05-23 15:09:02 654
原创 关于jdk1.7中的ThreadLocal
1.get()方法 /** * Returns the value in the current thread's copy of this * thread-local variable. If the variable has no value for the * current thread, it is first initialized to t
2018-05-23 15:08:30 593
原创 ForkJoinPool jdk1.7
ForkJoinPool是java.util.concurrent并发包下的一个类。这里只讨论 public ForkJoinTask submit(Callable task)的用法。ForkJoinTask实现了Future接口实现Callable接口可以新建一个可以返回值的线程。返回的是一个Future。通过调用ForkJoinPool中的submit方法,可以开启一个线程去执行,
2018-05-23 15:08:19 191
原创 Springmvc中的DispatcherServerlet粗略分析(springboot 1.4.0.RELEASE)
一.根据DispatcherServlet中的注释说明这个servlet用来调用handlers/controllers,springmvc中指的就是Controller,首先这个类对象初始化的时候会加载servlet使用到的所有组件 /*** This implementation calls {@link #initStrategies}.*/@Overrideprotec
2018-05-23 15:08:04 1444
原创 jdk源码中for(;;)思考
1.for(;;)和while(true)区别在jdk1.7.0_55环境下没有区别,编译后的文件相同Code: 0: aload_0 1: dup 2: getfield #2 // Field i:I 5: iconst_1 6: iadd ...
2018-05-23 15:07:49 365
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人