Basic Data Types
There are 3 basic data types:
Integer values are numeric values with no fractional part in them. For example:
5
,-10
,0
are integer values. All integer values in your program must be in the range -2147483648 to +2147483647.Floating point values are numeric values that include a fractional part. For example:
.5
,-10.1
,0.0
are all floating point values.Strings values are used to contain text. For example:
"Hello"
,"What's up?"
,"***** GAME OVER *****"
,""
.
Typically, integer values are faster than floating point values, which are themselves faster than strings.
Last updated