Home > Java > javaTutorial > body text

Keywords belonging to integer type in java

下次还敢
Release: 2024-04-28 23:45:19
Original
1100 people have browsed it

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template