Skip to content

Instantly share code, notes, and snippets.

@ionelh
Last active January 28, 2020 16:56
Show Gist options
  • Save ionelh/36433f1110e7a90ceeca288761b303b4 to your computer and use it in GitHub Desktop.
Save ionelh/36433f1110e7a90ceeca288761b303b4 to your computer and use it in GitHub Desktop.
// min / max value
System.out.println(Long.MIN_VALUE);
System.out.println(Long.MAX_VALUE);
// Long is a 64-bit signed two's complement integer from -9,223,372,036,854,775,808(-2^63) to 9,223,372,036,854,775,807 (inclusive)(2^63 -1)
// mainly used when the range of int is not enough
long largeNo = 9223372036854775807L;
long withSeparator = 9_223_372_036_854_775_807L;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment