Vidyalelo
Computer Science · Q212

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 212

Q212

In Kotlin, how do you compare two Strings for equality?

A.
str1 == str2
B.
str1.equals(str2)
C.
Both A and B
Answer
D.
str1.sameAs(str2)

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board