Thursday, May 14, 2020

Data types in Java ?


Data Types in Java
  1. Primitive Data Type
  2. Non-Primitive Data Type

Primitive Data Type:–
  1. Integer type –
    • byte (Memory Capacity - 8 bit)
    • short (Memory Capacity -16 bit)
    • int (Memory Capacity  32 bit)
    • long (Memory Capacity - 64 bit)
  2. Floating point types
    • float – (Memory Capacity  32 bit)
    • double - (Memory Capacity - 64 bit)
  3. Character types
    • char (Memory Capacity -16 bit)
  4. Boolean
    • boolean – (can hold only two values- true or false)
Non-Primitive data types
  1. String
  2. Array
  3. Class etc



No comments:

Post a Comment