Computer Science, asked by prabhakar8861, 7 months ago

Arrange the following data type as per size in ascending order- int , short , long , byte.​

Answers

Answered by stylishtamilachee
11

Answer:

Byte

Short

Int

Long

Therefore,

Byte < Short < Int < Long

Size:

  • Byte - 8 bits (1 byte)

  • Short - 16 bits (2 bytes)

  • Integer - 32 bits (4 bytes)

  • Long - 64 bits (8 bytes)

Explanation:

  • Byte, short, int and long - these are numeric integral types.

  • Numeric integral types are used to store numeric values.

  • These store integer values.

  • Java does not support unsigned data types that is, only positive numbers. All numeric types in java can store negative as well as positive numbers.
Answered by Anonymous
19

Byte - 8 bits

Short - 16 bits

Int - 32 bits

Long - 64 bits

Therefore,

Byte < Short < Int < Long

 

Hope it would be helpful :)

Similar questions