To do a case insensitive compare which of the following could be used to test the equality of two strings, str1 and str2?
A) (str1.equalsIgnoreCase(str2) )
B) (str1.compareToIgnoreCase(str2) == 0)
C) Only A
D) A and B
Correct Answer:
Verified
Q23: What will be the value of pay
Q25: What will be the values of ans,
Q26: What will be printed when the following
Q27: _ works like this: If the expression
Q29: In an if/else statement, if the boolean
Q30: The expression tested by an if statement
Q31: What would be the value of discountRate
Q32: What is the value of ans after
Q33: If str1 and str2 are both Strings,
Q54: Which of the following will format 12.78
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents