Multiple choice

How many primitive data types are present in Java?

  1. 6

  2. 8

  3. 12

  4. 14

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

Java has exactly 8 primitive data types: byte, short, int, long, float, double, char, and boolean. These are the basic types built into the language.