Multiple choice

Which of the following data types in Java has the smallest size in bits?

  1. Short

  2. Boolean

  3. Byte

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This data type takes 1 bit to store boolean values( true or false). Hence, it occupies the smallest size among all data types in Java.