Primitive data types | Object data types |
---|---|
int, double, boolean, etc. | String, Scanner, etc. |
type name starts with a lower case letter | type name starts with an upper case letter |
consist of a single value | can be composed of several values (a String is composed of several charactes) |
cannot be null (always have a valid value) |
can be null |
cannot have methods | can have methods (f. e. method equalsIgnoreCase() in String) |
we cannot define own primitive data types | we can define own object data types |