Which statement is true about primitive variables?
- They can be compared with the == operator.
- They can be compared with the equals method only.
- They cannot be compared.
- They can be compared with the compareTo method only.
Answer(s): B
Reference:
https://stackoverflow.com/questions/9690981/compare-two-primitive-long-variables-in-java
Reveal Solution Next Question