Byte.MAX_VALUE in Java

Byte.MAX_VALUE: This is available in the java.lang.Byte class of Java.

Syntax:

byte java.lang.Byte.MAX_VALUE.

A constant holding the maximum value a byte can have, 2^7-1 (127).

Approach

Java

public class ByteMaxValue {

    public static void main(String[] args) {

        System.out.println(Byte.MAX_VALUE);
    }
}

Output:

127

No comments:

Post a Comment