The maximum value that can be assigned to a
long
variable in Java is 9,223,372,036,854,775,807
.Here's the proof:
// 9223372036854775807
System.out.println(Long.MAX_VALUE);
long
variable in Java is 9,223,372,036,854,775,807
.Here's the proof:
// 9223372036854775807
System.out.println(Long.MAX_VALUE);