Skip to content

Instantly share code, notes, and snippets.

@aeg
Created January 4, 2013 09:06
Show Gist options
  • Save aeg/4451086 to your computer and use it in GitHub Desktop.
Save aeg/4451086 to your computer and use it in GitHub Desktop.
n進数表現
// Case #1
// 数値の2進数、8進数、16進数、n進数表現
// 2進数(00001111)
assert 0b00001111 == 15
// 8進数(0100)
assert 0100 == 64
// 16進数(ff)
assert 0xff == 255
// n進数
assert 25 == Long.parseLong("221", 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment