Home » JAVA Programming » Java Basic » Question
  1. What does assertSame() method use for assertion?
    1. isEqual() method
    2. compare() method
    3. equals() method
    4. ==
    5. None of these
Correct Option: D

== is used to compare the objects not the content. assertSame() method compares to check if actual and expected are the same objects. It does not compare their content.



Your comments will be displayed only after manual approval.