Quantcast
Channel: Examples Java Code Geeks » primitives
Browsing index pages (8 articles)
↧

short

In this example we shall show you how to use a short type in Java. The short data type is a 16-bit signed two’s complement integer. It has a minimum value of -32,768 and a maximum value of 32,767...

View Article


long

With this example we are going to demonstrate how to use a long type in Java. The long data type is a 64-bit signed two’s complement integer. It has a minimum value of -9,223,372,036,854,775,808 and a...

View Article


int

This is an example of how to use an int type in Java. The int data type is a 32-bit signed two’s complement integer. It has a minimum value of -2,147,483,648 and a maximum value of 2,147,483,647...

View Article

float

In this example we shall show you how to use a float type in Java. The float data type is a single-precision 32-bit IEEE 754 floating point. Use a float (instead of double) if you need to save memory...

View Article

double

With this example we are going to demonstrate how to use a double type in Java. The double data type is a double-precision 64-bit IEEE 754 floating point. For decimal values, this data type is...

View Article


char

This is an example of how to use a char type in Java. The char data type is a single 16-bit Unicode character. It has a minimum value of ‘\u0000′ (or 0) and a maximum value of ‘\uffff’ (or 65,535...

View Article

byte

In this example we shall show you how to use a byte type in Java. The byte data type is an 8-bit signed two’s complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive)....

View Article

boolean

With this example we are going to demonstrate how to use a boolean type in Java. The boolean data type has only two possible values: true and false. Use this data type for simple flags that track...

View Article

Browsing index pages (8 articles)


Latest Images