Computer Science, asked by tanmaytak63, 11 months ago

Data type group of same size in java

Answers

Answered by sawakkincsem
0

Answer:

Below are the details of the question answered.

Explanation:

Java is a computerized language. It is used for high level programming. Java was produced in 1991. James Gosling from Sun Micro-systems together with his team were the first people who made it. They made the first java for home appliances using different computer processors.  Java has always been user friendly. It creates modular programs which contain reusable code.

Following are the types of Java:

  • Byte (1 byte)
  • Short (2 bytes)
  • Int (4 bytes)
  • Long (8 bytes)
  • Float (4 bytes)
  • Double (8 bytes)
  • Boolean (1 bit)
  • Char (2 bytes)

These are all primitive data types.

Answered by lovingheart
0

Below listed are primitive data types where they contain same size:

Short & Char – 2 bytes

Boolean – 1 bit

int and float – 4 bytes

long and double 8 bytes

byte – 1 byte

Short, int, long belong to integer data type where it stores only whole number.

float, double are classified into floating type where it accepts only decimal values. It does accept negative values.

Char belongs to string data type where it accepts single character

Boolean accepts true or false alone.

Similar questions