How to Create a Byte Type in Java


In this example we will show you how to create a byte type in Java.

Source Code

package com.beginner.examples;

public class ByteType {
  public static void main(String[] args) {
    byte num = 50; // byte
    System.out.println(num);
  }
}

Output:

50
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments