Skip to content

Instantly share code, notes, and snippets.

@babanin
Created December 3, 2013 18:43
Show Gist options
  • Select an option

  • Save babanin/5f3130c3cbb07491832a to your computer and use it in GitHub Desktop.

Select an option

Save babanin/5f3130c3cbb07491832a to your computer and use it in GitHub Desktop.
private static class LongCache {
private LongCache(){}
static final Long cache[] = new Long[-(-128) + 127 + 1];
static {
for(int i = 0; i < cache.length; i++)
cache[i] = new Long(i - 128);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment