Java Get Minimum Long Value

Tags: long

In this Java core tutorial we learn how to get the minimum long value in Java programming language.

How to get minimum long value in Java

In Java, to get the minimum long value we can use the Long.MIN_VALUE constant as the following example Java program.

GetMinLongExample.java

public class GetMinLongExample {
    public static void main(String... args) {
        // Get minimum Long value
        long minLong = Long.MIN_VALUE;

        System.out.println("Minimum Long Value: " + minLong);
    }
}
The output as below.
Minimum Long Value: -9223372036854775808

Happy Coding 😊

Java Get Maximum Long Value