integers in java

Publicado em: 04 Outubro 2022
no canal de: Gua Java
16
2

what is datatype?
Defines what type of data your variable will hold. Means depending upon the type of data, datatype is associated with the variable.

Example:
If you want to store whether user is login or not, use Boolean.

In this video we will discuss integer datatypes in detail which are as follow.
integers data types:
Byte
short
int
long
What are integers in java?
whole numbers that starts from the 0 to infinite, but in java they are finite.
Can be positive or negative.

Byte?
byte's width is 1 byte i.e. 8 bits.
its range is from -128 to 127.

Short?
short's width is 2 byte i.e. 16 bits.
its range is from -32768 to 32767.

Int?
int's width is 2 byte i.e. 16 bits.
its range is from -2147483648 to 2147483647.

long?
long's width is 2 byte i.e. 16 bits.
its range is from -9223372036854775808 to 9223372036854775807.

NOTE:
width is the size of memory each datatype occupies.
range is the minimum and maximum values that a datatype can hold.


Nesta página do site você pode assistir ao vídeo on-line integers in java duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Gua Java 04 Outubro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 16 vezes e gostou 2 espectadores. Boa visualização!