Home  >  Article  >  Java  >  Keywords belonging to integer type in java

Keywords belonging to integer type in java

下次还敢
下次还敢Original
2024-04-28 23:45:191067browse

Java has 5 keywords to define integer types: byte (8 bits), short (16 bits), int (32 bits, default), long (64 bits), char (16 bits, representing Unicode character).

Keywords belonging to integer type in java

Java integer type keywords

The keywords used to define integer types in Java are:

  • byte: byte type, occupies 8 bits, value range: -128 to 127
  • short: short integer type, Occupies 16 bits, value range: -32768 to 32767
  • int: Integer type (default type), occupies 32 bits, value range: -2147483647
  • long: long integer, occupies 64 bits, value range: -9223372036854775808 to 9223372036854775807

The above is the detailed content of Keywords belonging to integer type in java. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn