Solved

Suppose We Want to Condition an If Statement on Whether

Question 14

Multiple Choice

Suppose we want to condition an if statement on whether two String objects, referenced by stringOne and stringTwo, are the same. Which of the following is the correct way to achieve this?


A) if(stringOne == stringTwo)
B) if(stringOne.compareTo(stringTwo) )
C) if(stringOne.equals(stringTwo) )
D) if(stringOne != stringTwo)
E) if(stringOne === stringTwo)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents