Solved

If Str1 and Str2 Are Both Strings, Which of the Following

Question 33

Multiple Choice

If str1 and str2 are both Strings, which of the following will correctly test to determine whether str1 is less than str2?
(1) (str1 < str2)
(2) (str1.equals(str2) < 0)
(3) (str1.compareTo(str2) < 0)


A) 1, 2, and 3 will all work
B) 2
C) 3
D) 2 and 3

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