Multiple choice technology web technology

Which of the following are primitive types?

  1. byte

  2. String

  3. integer

  4. Float

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

In Java, primitive types are the basic data types built into the language: byte, short, int, long, float, double, char, boolean. String is a class (reference type). integer is not a valid Java type (it should be int). Float is a wrapper class, not a primitive (float is the primitive).

AI explanation

In Java, the primitive types are byte, short, int, long, float, double, boolean, and char — all lowercase, fixed-size value types. "byte" is correct because it is one of these eight primitives. The other options are wrapper/reference types or misspellings: "String" is a class (reference type), not a primitive. "integer" is not valid Java syntax for a primitive at all (the primitive is "int", while "Integer" with a capital I is the wrapper class) — as written it names neither. "Float" with a capital F is the wrapper class Float, not the primitive "float". So only "byte" matches an actual primitive type declaration.