Wednesday 11 December 2013

Java - Primitive Data Types (Quick Note)

int: 32-bit (4-byte) integer, has a minimum value of -231 and a maximum value of 231-1. 
short: 16-bit (2-byte) integer, has a minimum value of -32,768 and a maximum value of 32,767.
long: 64-bit (8-byte) integer, has a minimum value of -263 and a maximum value of 263-1.

float: 32-bit (4-byte) floating point value
double: 64-bit (8-byte) floating point value 

char: 16-bit (2-byte) character using Unicode encoding scheme

Boolean: a true or false value

For more information, visit Oracle: Primitive Data Types

No comments:

Post a Comment