Java Byte SIZE

Syntax

Byte.SIZE has the following syntax.

public static final int SIZE

Example

In the following code shows how to use Byte.SIZE field.

To get the size of a byte value, just call its static constant SIZE as the follows:


public class Main {
/*from   ww w  . ja va2  s  .  c  o m*/
  public static void main(String args[]) {
    System.out.println("Size of a Byte:"+Byte.SIZE);
  }
}

The output:





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable