by Dinesh Thakur Category: Data Type

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

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content