Other Data Types
Primitives already went over ints, booleans, doubles, and Strings. These are a few of the other data types:
- char: a single character (uses single quotes)
- short: a more memory efficient version of int (with a smaller range)
- long: a longer version of int, with a much larger range
- float: similar to double, but can only hold 7 decimals instead of 15
Examples below
char letter = 'b';
short shortNumber = 45;
long longNumber = 100000;
float floatNumber = 5.23f;