Skip to main content

Primitive Type

Definition:
A basic data type built into the language, such as int, float, or char.


Detailed Explanation

  • Primitive types store simple values directly in memory.
  • They are usually more efficient than complex types.
  • Examples: integers, floating points, booleans, and characters.

Example

// Example of primitive types // int age = 30; // boolean isActive = true;


⬅ Back