Java MCQ: Which of the following is a Java primitive data type?
a) String
b) int
c) ArrayList
d) Boolean
Answer:
b) int
Explanation:
int
is a primitive data type in Java, representing a 32-bit signed integer. Other primitive data types include boolean
, char
, float
, double
, byte
, short
, and long
.
Understanding primitive data types is fundamental for handling basic values in Java applications efficiently.
Reference links:
https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html