Examveda
Examveda

The smallest integer type is ......... and its size is ......... bits.

A. short, 8

B. byte, 8

C. short, 16

D. short, 16

Answer: Option B

Solution(By Examveda Team)

The smallest integer type in Java is byte, and its size is 8 bits.

Here's the breakdown:

Option A: short, 8 - This option is not correct. While short is a small integer type, its size is 16 bits (2 bytes), not 8 bits.

Option B: byte, 8 - This option is correct. The byte data type is the smallest integer type in Java, and it has a size of 8 bits (1 byte).

Option C: short, 16 - This option is not correct. While short has a size of 16 bits, it is larger than the byte data type.

Option D: byte, 16 - This option is not correct. The size mentioned here, 16 bits, is incorrect for the byte data type. The correct size of byte is 8 bits.

So, the correct answer is that the smallest integer type in Java is byte, and its size is 8 bits.

This Question Belongs to Java Program >> Data Types And Variables

Join The Discussion

Comments ( 2 )

  1. Saurabh Pakhale
    Saurabh Pakhale :
    11 months ago

    short ko 2byte ki memory milti hai but byte ko only 1byte ki memory milti hai

  2. Arjun Kumaresan
    Arjun Kumaresan :
    6 years ago

    Is anybody to clear this doubt byte is a smaller integer type

Related Questions on Data Types and Variables