Computer Science, asked by harsh5782, 1 year ago

what are primitive and non primitive data type

Answers

Answered by Rajdeep11111
16
HOLA friend!!
Rajdeep here.....

In Java programming, there are two types of DATATYPES, they are Primitive datatypes and Non-Primitive datatypes.

Primitive datatypes: These are the datatypes which are built-in datatypes and are independent, i.e.m do not depend on any other datatypes.
Eg- byte, char, short, int, long, float, double, boolean.

Non-primitive datatypes: These are the datatypes which are indirectly dependent on the primitive datatypes.
Eg- Classes, Arrays, Interfaces.

Thanks!!
Answered by samuchiwalyash037
5

Primitive data type : they are independent of any other data type.

Example: byte int long.

Non primitive data type: They are dependent indirectly on primitive data type. Example: classes arrays and interface

Similar questions