-
Notifications
You must be signed in to change notification settings - Fork 0
Data types
Mohamed Hassan edited this page Jan 16, 2026
·
4 revisions
-
byte:
- A signed 8-bits of integer type, which has a minimum value of -128 and a maximum value of 127.
-
short:
- A signed 16-bits of integer type, which has a minimum value of -32,768 and a maximum value of 32,767.
-
int:
- A signed 32-bits of integer type, which has a minimum value of -231 and a maximum value of 231-1.
-
long:
- A signed 64-bits of integer type, which has a minimum value of -263 and a maximum value of 263-1.
-
float:
- A signed 32-bits of decimal type.
-
double:
- A signed 64-bits of decimal type.
-
boolean:
- Has only two possible values: true and false. Use this data type for simple flags that track true/false conditions. This data type represents one bit of information.
-
char:
- Is a single 16-bits Unicode character. It has a minimum value of '\u0000' (or 0) and a maximum value of '\uffff'.
- called
reference typesbecause they refer to objects - built-in types: Strings, Arrays, ...
- custom data types as utilizing
classconstruct to built your own type based on the business need
