Software programming_01_Data types
Data types

byte

The byte data type can store whole numbers from -128 to 127. This can be used instead of int or other integer types to save memory when you are certain that the value will be within -128 and 127:

Example

public class Main {

  public static void main(String[] args) {

    byte myNum = 126;

    System.out.println(myNum); 

  }

}

Copyright@ 2021. All rights reserved. -NVQ Project-

Don`t copy text!