integers in java

Veröffentlicht am: 04 Oktober 2022
auf dem Kanal: 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.


Auf dieser Seite können Sie das Online-Video integers in java mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Gua Java 04 Oktober 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 16 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!