Java DataTypes – primitive & non primitive

DataType defines a particular kind of data or value it can take

Primitive DataType: 

Primitive means “very basic”.

In Java, primitives are the most basic kinds of data types and they directly contain values like int, char etc.

NonPrimitive DataType: 

Non primitive datatypes are those which uses primitive datatype as base like array, class etc.

Also called as reference types which references a memory location where the data is stored rather than directly containing a value.


Primitive types –

Output –

Watch in action here –

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *