MCQ: Which data type in Java is used to store text?
a) char
b) String
c) int
d) boolean
Answer:
b) String
Explanation:
The 'String' data type in Java is used to store text values, which are enclosed in double quotes.
The 'String' data type in Java is used to store text values, which are enclosed in double quotes.