Java get minimum short value

Tags: short

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

How to get minimum short value in Java

In Java, we can get minimum short value using the Short.MIN_VALUE constant as the following Java program.

public class GetMinShortExample {
    public static void main(String... args) {
        // Get minimum short value
        short minShortValue = Short.MIN_VALUE;

        System.out.println("Minimum short value: " + minShortValue);
The output as below.
Minimum short value: -32768

Happy Coding 😊

Java get maximum short value