Skip to content

Instantly share code, notes, and snippets.

@ionelh
Created January 28, 2020 16:28
Show Gist options
  • Save ionelh/394227c70a281cf6f8ca756eb8387400 to your computer and use it in GitHub Desktop.
Save ionelh/394227c70a281cf6f8ca756eb8387400 to your computer and use it in GitHub Desktop.
// min / max value
System.out.println(Short.MIN_VALUE);
System.out.println(Short.MAX_VALUE);
// short is a 16-bit signed integer from -32,768 (-2^15) to 32,767 (inclusive) (2^15 -1)
// 2 times smaller than int
short tenThousand = 10000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment