What are primitive and non-primitive data types?
What are primitive and non-primitive data types?
A data type is a classification of data, which can save a particular type of information. Data types are mainly used in computer programming, in which variables are created to store data. Each variable is assigned a data type that find out what type of data the variable may have.
The term "data type" and "primitive data type” regularly used interchangeably. The primitive data types predefined types of data, supported by the programming language. For example, integer, character, and the series are all primitive data types. Developers can use these data types when creating variables in their programs. For example, a programmer can create a variable called "name" and set as a string data type. This variable will store the data to as a string of characters.
In programming language Non-primitive data type are not defined, but are in its place created by the programmer. They are called "reference variables," or "object references," since they reference a memory location, which stores the data. In programming language Non-primitive data type are not defined.
Bookmarks