![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Jdk 学习
文章平均质量分 68
zhangyu84848245
这个作者很懒,什么都没留下…
展开
-
Java 通过ReflectionFactory 创建序列化的实例(原创)
import java.io.Serializable;public class Foo implements Serializable { private String str; public Foo(String str) { this.str = str; }} Foo是一个可以序列化的实体类public class FooTest { p...原创 2016-05-03 14:50:42 · 604 阅读 · 0 评论 -
Xorshift RNGs生成随机数
private transient int randomSeed;randomSeed = seedGenerator.nextInt() | 0x0100;private int randomLevel() { int x = randomSeed; x ^= x << 13; x ^= x >>&...原创 2016-05-08 14:53:39 · 1954 阅读 · 0 评论 -
sun.misc.Unsafe 操作数组(原创)
sun.misc.Unsafe 操作数组的例子, 参照 jdk 的 java.util.concurrent.ConcurrentHashMap的源代码package org.fantasy.unsafe;public interface Array<T> { /** * 根据下标获取指定的元素 * @param index * @return...原创 2016-02-29 17:27:25 · 568 阅读 · 0 评论