Advertisements
Advertisements
Question
Which of the following is a non-primitive data type?
Options
int
double
char
String
MCQ
Solution
String
Explanation:
A string is a non-primitive data type in Java. It is a class that allows String objects to store character sequences. Non-primitive data types (sometimes referred to as reference types) are more complicated than primitive types and may contain classes, arrays, and interfaces.
shaalaa.com
Is there an error in this question or solution?