MCQs > IT & Programming > Scala > If you want to compare two objects to see if they are equal, you should usually use either ==, or its inverse !=. Which code is true?

Scala MCQs

If you want to compare two objects to see if they are equal, you should usually use either ==, or its inverse !=. Which of the following code is true?

Answer

Correct Answer: scala> 1 == 2 res24: Boolean = false scala> 1 != 2 res25: Boolean = true scala> 2 == 2 res26: Boolean = true

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Scala Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Scala Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it