
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 · 666 阅读 · 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 · 2102 阅读 · 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 · 602 阅读 · 0 评论