20.4k views
4 votes
Which data type is not a primitive data type?

A) short
B) string
C) byte
D) float

User Marysue
by
8.1k points

1 Answer

5 votes

Final answer:

The data type that is not a primitive data type is string, because it is a sequence of characters and a composite type rather than a basic built-in type.

Step-by-step explanation:

The data type that is not a primitive data type is B) string. Primitive data types in many programming languages, like Java, are the basic types of data built into the language. These include byte, short, int, long, float, double, char, and boolean. A string, on the other hand, is a sequence of characters and is not considered a primitive data type because it is a composite of primitives (chars), and it provides methods for manipulation.

User Hans Derks
by
8.2k points