Java Foundations — Question 12

Which statement is true about primitive variables?

Answer options

Correct answer: A

Explanation

The correct answer is A because primitive variables in programming languages can be compared using the == operator to check for equality. Options B, C, and D are incorrect since primitive types do not require the equals method or the compareTo method for comparison, and they can indeed be compared.