by Dinesh Thakur

This Java byte Example shows how to use Java primitive byte variable inside a java class. The byte is a 8 bit signed type ranges from –128 to 127. The syntex For Declare byte varibale is byte <variable name> = <default value>;

Here is the Java Example for the program JavaByteExample :

public class JavaByteExample

{
     public static void main(String args[])
    {
     byte bbyte = 100;
    Byte byt = new Byte("92");
    System.out.println("Value of byte variable bbyte : " +bbyte);
    System.out.println("Value of byte variable byt : " +byt);
  }
}

Java Byte Example